Jan 12, 2011 #1 tqeonline MIS Oct 5, 2009 304 US What is an easy way to show GETDATE() but only to the hour. I.E. 1/11/2010 13:00:00.000 - Matt "If I must boast, I will boast of the things that show my weakness" - Windows 2003 Server, 98 SE, XP - VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
What is an easy way to show GETDATE() but only to the hour. I.E. 1/11/2010 13:00:00.000 - Matt "If I must boast, I will boast of the things that show my weakness" - Windows 2003 Server, 98 SE, XP - VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
Jan 12, 2011 #2 PWise Programmer Dec 12, 2002 2,633 US how about Code: Select Dateadd(hh,Datediff(hh,Convert(datetime,Convert(varchar(12),getdate())),Getdate()), Convert(datetime,Convert(varchar(12),getdate()))) Upvote 0 Downvote
how about Code: Select Dateadd(hh,Datediff(hh,Convert(datetime,Convert(varchar(12),getdate())),Getdate()), Convert(datetime,Convert(varchar(12),getdate())))
Jan 12, 2011 1 Thread starter #3 tqeonline MIS Oct 5, 2009 304 US I tried this Code: DateAdd(HH, DateDiff(HH, 0, GETDATE()), 0) IT works. - Matt "If I must boast, I will boast of the things that show my weakness" - Windows 2003 Server, 98 SE, XP - VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008 Upvote 0 Downvote
I tried this Code: DateAdd(HH, DateDiff(HH, 0, GETDATE()), 0) IT works. - Matt "If I must boast, I will boast of the things that show my weakness" - Windows 2003 Server, 98 SE, XP - VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008