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

Converting seconds to actual datetime string

Status
Not open for further replies.

tkennedy

MIS
Jun 26, 2001
1
US
I am having a problem converting stragiht seconds to the actual datetime string using the dateadd function I an using the syntax as follows:

dateadd(s,[sql field],'01/01/1970') I am adding the sql field which is the number of seconds value to epoc time. IS this correct?

The problem is that the value that comes out is about 4 hours ahead of this value.

What is the deal? :-(
 

You have the correct syntax. I tried the function and it worked.

I don't understand your last comment. [ul]"The problem is that the value that comes out is about 4 hours ahead of this value." [/ul]Do you mean the value is four hours ahead of the expected or correct value? How do you know that? Is there a formula you are using to determine the correct value? Terry
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top