SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Question about SQL SERVER TIME and GMT TIME
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wshtrue
Yak Posting Veteran

74 Posts

Posted - 08/26/2006 :  13:37:47  Show Profile  Reply with Quote
Hi Guys,
Your help will be greatly appreciated. OK now my question is that we are using SQL Server 2000 and we are using Microsoft Report Manager as a Reporting tool.
It has too text boxes labeled as Start Date and End Date. Let us say that I enter 07/10/2006 in Start Date and 07/10/2006 in End Date. When my report is executed it displays 07/10/2006 12:00 AM and 07/10/2006 12:00 AM in the End Date. IS IT CORRECT?
Actually I want report to display me all transactions according to GMT Time so Please help me in understanding that What time should It show in Start Date and End Date and I should be getting transactions from what time to what time if my Start Date and End Date is entered 07/10/2006 12:00AM.
Right now it is displaying me transactions for 07/10/2006 10:AM to 9:59PM of 07/11/2006. IS IT CORRECT?

Now if I enter 07/11/2006 in Start Date and End Date then please tell me should I be seeing any transactions of 07/11/2006 which were displayed when I had entered 07/10/2006 in Start Date and End Date
Your help will be greatly appreciated. Thanks

SwePeso
Patron Saint of Lost Yaks

Sweden
29910 Posts

Posted - 09/04/2006 :  06:11:53  Show Profile  Visit SwePeso's Homepage  Reply with Quote
There is no way to tell GMT time, unless the transactions made contains information about time zone.

And in your query, use

select * from whatever
WHERE someDatecolumn >= DATEADD(day, DATEDIFF(day, 0, @StartDate), 0)
and someDatecolumn < DATEADD(day, DATEDIFF(day, 0, @StartDate), -1)



Peter Larsson
Helsingborg, Sweden

Edited by - SwePeso on 09/04/2006 08:55:54
Go to Top of Page

harsh_athalye
Flowing Fount of Yak Knowledge

India
5509 Posts

Posted - 09/04/2006 :  09:22:41  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
The function GetUTCDate() returns Universal Time Coordinate or GMT) as per BOL. Check whether it can be of any help !

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000