I have a date time value from sql server
15/04/2005 04:15:22
i want to get just the time in vb.net. how do i do it? is there an object i can pass the datetime too, to get the time back?
Printable View
I have a date time value from sql server
15/04/2005 04:15:22
i want to get just the time in vb.net. how do i do it? is there an object i can pass the datetime too, to get the time back?
You could use the TimeOfDay, Hour, Minute, Second properties if that were a valid datetime format string.
thanks for the replies. i tried to reply before but my interne connection was f**ked. yeah i ended up using hour(datestring).
i had been writing a stored proc to feed a report using reporting services
and where i got stuck was writing an expression to filter out some results that were within a certain time range (basically in and out of office hours).
Why didn't i do this in the sql you ask? well, i have several matrices on the one report all fed by the same stored proc, and i then use filtering in reporting services to get the right results for each matrix.
got there in the end. thanks for the help
MessageBox.Show(DateTime.Now.ToString("HH:mm:ss"))
c'mon, don't censure yourself