Subject | Re: [firebird-support] Date to seconds |
---|---|
Author | Don Gollahon |
Post date | 2003-07-10T06:01:50Z |
Oops, that should be:
select (cast(mydatefld as timestamp)-cast('1/1/1970' as timestamp)) * 86400
as
DateInSeconds
from mytable
""Don Gollahon"" <dlgllhn@...> wrote in message
news:<000101c346a8$01b4c4e0$0100a8c0@gollahon>...
Wouldn't it be something like:
select cast(mydatefld as timestamp)-cast('1/1/1970' as timestamp) * 86400 as
DateInSeconds
from mytable
I'm just guessing here. Haven't tried it. Subtracting 2 dates like this
and multiplying by 86400 does work in Delphi. Not sure in Sql.
""Martin"" <moirae@...> wrote in message
news:<20030709150342Z1593315-5592+228139@...>...
Hi.
Could anyone help me please? I need to convert date to count of
seconds from Jan 1 1970 inside SP. I tried to make it with CAST(),
but I wasn't successful. What should be the right syntax or functions?
Thanks.
Martin
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
select (cast(mydatefld as timestamp)-cast('1/1/1970' as timestamp)) * 86400
as
DateInSeconds
from mytable
""Don Gollahon"" <dlgllhn@...> wrote in message
news:<000101c346a8$01b4c4e0$0100a8c0@gollahon>...
Wouldn't it be something like:
select cast(mydatefld as timestamp)-cast('1/1/1970' as timestamp) * 86400 as
DateInSeconds
from mytable
I'm just guessing here. Haven't tried it. Subtracting 2 dates like this
and multiplying by 86400 does work in Delphi. Not sure in Sql.
""Martin"" <moirae@...> wrote in message
news:<20030709150342Z1593315-5592+228139@...>...
Hi.
Could anyone help me please? I need to convert date to count of
seconds from Jan 1 1970 inside SP. I tried to make it with CAST(),
but I wasn't successful. What should be the right syntax or functions?
Thanks.
Martin
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/