• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Date/Time Over Midnight

I have a server based on US Pacific TZ but the site is used in the US Eastern TZ.

So throughout all of my code I convert any times stored in the SQL tables to +3; however, I'm not sure how to handle the date.

For example, something is done on the website at 1:00 AM on 04/28/2010.  When it sends the data to the database it puts 04/27/2010 10:00 PM.  That, I'm fine with that it keeps doing that.

But if I want to dispaly this on the site how can I make sure that the date dispalys the 28th because if I do my timeformat of +3 to display the correct EST of 1:00 AM is there a way to dispaly the date as the 28th without adding a bunch of CF statements?

For example, the only way I can figure out how to do this is to say that if the time is after 21:00:00 then add a day to the date, else, display the date as is.
0
Lee R Liddick Jr
Asked:
Lee R Liddick Jr
1 Solution
 
azadisaryevCommented:
use DateAdd() function to add 3 hours to your datetime object:

dateadd("h", 3, dateobject)

http://cfquickdocs.com/cf8/?getDoc=DateAdd

Azadi
0
 
Lee R Liddick JrReporting AnalystAuthor Commented:
Excellent...Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now