This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

How to get a timestamp from a d-M-Y date?

Old posts that have not been replied to for several years.
Locked
l
l337
Voice
Posts: 6
Joined: Sat Jan 15, 2005 4:36 pm

How to get a timestamp from a d-M-Y date?

Post by l337 »

Hi all. I've for example a date like 23-08-2005, and I would like to convert it in the unixtime.
Thanks for ur help :p
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

have you bothered to read the read the tcl command documentation of clock scan?

read date closely, because the shown string is not "standard compliant".
tip: you can string map the month to the 3 char representation, like {-08- -Aug-}.
tcl: evaluate (.tcl): clock scan 23-08-2005
Tcl error: unable to convert date-time string "23-08-2005"
tcl: evaluate (.tcl): clock scan 23-Aug-2005
Tcl: 1124751600
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked