select dateadd(ss, {field_name}, '19700101')
This entry was posted Tuesday, April 24th, 2007 at 1:37 pm and is filed under Computer, MSSQL, Things I forget. You can leave a response, or trackback from your own site.
When I use the following function.
The date is one day ahead of what it should be. It does not show any time.
SELECT DATEADD(SECOND, 1179367200, '19700101') as realdate
returns 2007-05-17 02:00:00.000
the date and time should be 2007-05-16 7:00 pm
select dateadd(ss, {field_name}, ‘19700101′)
Can anyone help me with this.
Hello. Why do you say that
SELECT DATEADD(SECOND, 1179367200, ‘19700101′) as realdate
should returns 2007-05-16 7:00 pm ?
If I convert 1179367200 I get Thu, 17 May 2007 04:00:00 +0200
Name (required)
Mail (will not be published) (required)
Website
May 16th, 2007 at 7:54 pm
When I use the following function.
The date is one day ahead of what it should be.
It does not show any time.
SELECT DATEADD(SECOND, 1179367200, '19700101') as realdate
returns
2007-05-17 02:00:00.000
the date and time should be
2007-05-16 7:00 pm
select dateadd(ss, {field_name}, ‘19700101′)
Can anyone help me with this.
May 18th, 2007 at 4:57 pm
Hello. Why do you say that
should returns 2007-05-16 7:00 pm ?
If I convert 1179367200 I get Thu, 17 May 2007 04:00:00 +0200