Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Date conversion to epoch w/out mysql.pm

by ptum (Priest)
on Jan 05, 2006 at 16:51 UTC ( #521271=note: print w/ replies, xml ) Need Help??


in reply to Date conversion to epoch w/out mysql.pm

It seems to me that this is something that date functions in SQL could do for you. You could either use DATEDIFF with 1/1/1970 (and multiply by seconds per day) to come up with 'seconds since epoch' or you could use DATEPART to dismember the date and calculate 'seconds since epoch' yourself. Either way, if you're already selecting a row from a MSSQL database, it shouldn't require any extra modules. I'm not a MSSQL guy, but this might help you.


No good deed goes unpunished. -- (attributed to) Oscar Wilde


Comment on Re: Date conversion to epoch w/out mysql.pm
Replies are listed 'Best First'.
Re^2: Date conversion to epoch w/out mysql.pm
by Anonymous Monk on Jan 05, 2006 at 17:04 UTC
    DateDIFF in seconds can be done in the sql on mssql. Thanks !

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://521271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-08-03 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (28 votes), past polls