Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Datetime with timezone type

Status
Not open for further replies.

synapsevampire

Programmer
Mar 23, 2002
20,180
0
0
US
I'm hoping that this new addition to the datetime resolves an age old problem for me, which is querying across multiple timezones.

If I have a datetime with timezone in it, can I:

select based on times for local times of 8AM, OR select on a UTC time (or some standard time) of 8AM by setting something?

The point is:

get all data for a specified date between 00:00 and 23:59 using the local time zone.

AND be able to

get all data for a specified date between 00:00 and 23:59 using a universal time?

By uing just one datetime field?

-k kai@informeddatadecisions.com
 
Yes you can have only one date time field which will give you this data u need about diff time zones from one and hte same value in diff. timezones.

abhivyakti
 
Thanks for the response.

Currently we store 2 datetimes, UTC and local. What sort of performance hit will I take for a 3 million row query if I move to using just one datetime with timezone to replace these 2, and convert the datetime on the fly?

Any other thoughts on this?

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top