Aug 4, 2008 #1 ekta22 IS-IT--Management May 3, 2004 359 US Hi, I have a datetime field and I was to extract just the hour portion of that in my SQL statement. Any ideas on how to do this? I tried to look around but did not find anything. Thanks, -E
Hi, I have a datetime field and I was to extract just the hour portion of that in my SQL statement. Any ideas on how to do this? I tried to look around but did not find anything. Thanks, -E
Aug 4, 2008 #2 PHV MIS Nov 8, 2002 53,708 FR SELECT CAST(yourDateTimeColumn AS TIME) ... Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Aug 4, 2008 #3 Ascalonian Programmer Jan 4, 2008 264 US Try this... Code: SELECT EXTRACT(HOUR FROM SYSDATE) Upvote 0 Downvote
Aug 4, 2008 #4 r937 Technical User Jun 30, 2002 8,847 CA mikey, nice ANSI well, except for the SYSDATE ;-) r937.com | rudy.ca Upvote 0 Downvote