|
-
Apr 21st, 2005, 08:56 AM
#1
Thread Starter
Hyperactive Member
get time from datetime
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?
-
Apr 21st, 2005, 09:52 AM
#2
Re: get time from datetime
You could use the TimeOfDay, Hour, Minute, Second properties if that were a valid datetime format string.
-
Apr 21st, 2005, 02:26 PM
#3
Thread Starter
Hyperactive Member
Re: get time from datetime [resolved]
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
-
Apr 21st, 2005, 02:40 PM
#4
Addicted Member
Re: get time from datetime
MessageBox.Show(DateTime.Now.ToString("HH:mm:ss"))
There are no stupid questions, but a whole bunch of dumb sayings !
Save time on database code, try DataLG !
-
Apr 21st, 2005, 04:16 PM
#5
Addicted Member
Re: get time from datetime
c'mon, don't censure yourself
There are no stupid questions, but a whole bunch of dumb sayings !
Save time on database code, try DataLG !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|