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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates in a table.

Status
Not open for further replies.

ssv45324

Programmer
Mar 17, 2006
16
0
0
US
Is it a good idea to store local dates in the same table? For example a table can be updated from different time zones. If a table is updated from EST, then the time stored will be EST, if a table is updated from CST, then the time stored will be the PST time. My argument for this, is that it eliminates the processing of the dates at a later point of time. For example, if i need to write a query to fetch the records of a company between certain dates, then i can just query the database and return the records directly w/o any further conversion.
A simple analogy - Company table, which has an column to specify the timezone it is present in.
Jobs table which has all the jobs posted by different companies.
If i want to fetch the jobs posted by a company between certain dates i can just write a sql query and not worry about any post processing if i store the local datetimes.
Any opinions on this.
 
Thanks for the response. The application i am talking about is a web application, so the server by default always gets the server date time. My debate is whether the datetimes stored in the table should be the server date time or the client date time.
 
Server datetime, no doubt.





------
[small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top