Jul 8, 2003 #1 iamanson Programmer Aug 17, 2001 42 AU Hello, I need to retrieve data within a specific time range, e.g 9:00am to 3:00pm It seems there is date function only, how about time?
Hello, I need to retrieve data within a specific time range, e.g 9:00am to 3:00pm It seems there is date function only, how about time?
Jul 8, 2003 #2 ClaireHCM IS-IT--Management Mar 26, 2003 772 US select * from table2 where convert(varchar(10),dates,108) between '09:00:00' and '15:00:00' Tablename is table2 with a datetime field column dates Upvote 0 Downvote
select * from table2 where convert(varchar(10),dates,108) between '09:00:00' and '15:00:00' Tablename is table2 with a datetime field column dates
Jul 8, 2003 Thread starter #4 iamanson Programmer Aug 17, 2001 42 AU By the way, where can you find what the 3rd parameter '108' in 'convert(varchar(10),dates,108)' function means? I can even find that in SQL's help. Upvote 0 Downvote
By the way, where can you find what the 3rd parameter '108' in 'convert(varchar(10),dates,108)' function means? I can even find that in SQL's help.
Jul 9, 2003 #5 MaffewW Technical User Apr 9, 2002 438 GB if you search for convert in BOL it should be there Matt Brighton, UK Upvote 0 Downvote