Format of time value

Astie

Active member
Joined
Oct 20, 2005
Messages
27
Location
Holland
Programming Experience
Beginner
hello,

i'm having a problem with my connection to my db. I've ot a column in my db (acces) called "tijd", in that column are only time-value's. But when i let one of that time-value's shown in a textbox (or something) i get by example this text: 30-12-1899 7:45:00. i only want to have the 7:45 shown in my textbox.

I've configuret the column in my db to be an date/time column and made it an shots timenote.

greats
Astie
 
A good way to do this is through creating a separate binding object, if you declare it 'WithEvents' then you can use the format event to display the data in a way that suits you....

VB.NET:
Dim WithEvents MyBinding As Binding
     MyBinding = New Binding('add the arguments here for the binding object)
txt1.DataBindings.Add(MyBinding)

Then open the format event for the new binding object


VB.NET:
e.Value = Format(e.Value, 'Set the format you want to display as a string')
 
Back
Top