Re: [WebDNA] timestamp conversion
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 107010
interpreted = N
texte = The best way is to create and save the time stamp is as a number. For example: (86400 is the seconds in 24 hours)[text]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][/text]Then to display this numerical value, use WebDNA's [format] context.To get the date:[format days_to_date][format .6d][math]([timestamp]/86400)+1[/math][/format][/format]To get the time:[format seconds_to_time][math][timestamp]-(86400*[format ..6d][math]([timestamp]/86400)[/math][/format])[/math][/format]OR to format is differently use[format Seconds_To_Time %I:%M:%S %p]MarcOn 7/20/2011 10:05 AM, Aaron Michael Kaczmarek wrote:> Does anyone have a script that will generate standard timestamps?> i.e. Wed, 08 Jun 2011 18:46:44 +0000>> as well as the reverse, to convert this timestamp into webdna format?> (this is really what I'm interested in)> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to:> archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us> .>-- -------------------------------------------Marc ThompsonSoftware EngineerMedia SolutionsUniversity Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Associated Messages, from the most recent to the oldest:
The best way is to create and save the time stamp is as a number. For example: (86400 is the seconds in 24 hours)[text]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][/text]Then to display this numerical value, use WebDNA's [format] context.To get the date:[format days_to_date][format .6d][math]([timestamp]/86400)+1[/math][/format][/format]To get the time:[format seconds_to_time][math][timestamp]-(86400*[format ..6d][math]([timestamp]/86400)[/math][/format])[/math][/format]OR to format is differently use[format Seconds_To_Time %I:%M:%S %p]MarcOn 7/20/2011 10:05 AM, Aaron Michael Kaczmarek wrote:> Does anyone have a script that will generate standard timestamps?> i.e. Wed, 08 Jun 2011 18:46:44 +0000>> as well as the reverse, to convert this timestamp into webdna format?> (this is really what I'm interested in)> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list.> To unsubscribe, E-mail to:> archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us> .>-- -------------------------------------------Marc ThompsonSoftware EngineerMedia SolutionsUniversity Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Marc Thompson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Can a database get stomped by simultaneous access? (1997)
SMSI, your store.smithmicro.com FTP server is down .. (2004)
Math, Multiple Equasions and Show/Hide (1998)
WebCat2b15MacPlugin - showing [math] (1997)
problems with 2 tags (1997)
Banners (1997)
CSS and SSI books (2004)
PCS Frames (1997)
Hard Questions ? (1997)
[/application] error? (1997)
Bug or syntax error on my part? (1997)
Serial Number Question (1997)
Making a page expire with web catalog? (1999)
CASTEGORIES IN DIFFERENT FRAMES (1997)
WebDelivery: One step closer !! (1997)
Simultaneous Users (1999)
Prices coming up 0.00 (2001)
Webcat causing crashes left and right! (1997)
Emailer port change (1997)
WebCat and WebTV (1997)