Re: [WebDNA] Need to convert unix date?

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 104163
interpreted = N
texte = Yeah same here... well, I don't have any further time to devote to this, but the problem to solve isn't really that difficult when you think about it: 1) There are 86400 seconds in a day. 2) 1252976934 (seconds) / 86400 (seconds) = 14502.xxxxxx, so 14503 since you want days, not specific time (right?) 3) You now would need to find the date that is 14503 days since 01/01/1970 and you could use [date] math to do it. I'm sure there's already code for this... -Dan On 12/15/2009 4:20 PM, David Bastedo wrote: > The timestamp *1252976934* corresponds to* 2009/09/14 06:08:54 pm PDT*. > > this is the time stamp: *1252976934* > > [format days_to_date %m/%d/%Y][format > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format][/format] > > gets me: 09/16/39 > > d. > > On Tue, Dec 15, 2009 at 6:54 PM, Dan Strong > wrote: > > Try this: > > [format days_to_date %m/%d/%Y][format > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format][/format] > > > > On 12/15/2009 3:47 PM, David Bastedo wrote: > > Hi, I need to convert a date stored in unix format - seconds > since Jan > 01, 1970. Is there a formula or function that anybody might have? > > I am pulling in an xml file generated by an external api and > that date > comes in this format. > > thanks. > > d. > > > -- > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > T. 416.603.2223 > M. 416.277.4499 > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: > http://forum.webdna.us/eucabb.html?page=topics&category=288 > > > > > > -- > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > T. 416.603.2223 > M. 416.277.4499 Associated Messages, from the most recent to the oldest:

    
  1. Fwd: [WebDNA] Need to convert unix date? (William DeVaul 2011)
  2. Re: [WebDNA] Need to convert unix date? (Donovan Brooke 2009)
  3. Re: [WebDNA] Need to convert unix date? (Donovan Brooke 2009)
  4. Re: [WebDNA] Need to convert unix date? (Marc Thompson 2009)
  5. Re: [WebDNA] Need to convert unix date? (christophe.billiottet@webdna.us 2009)
  6. Re: [WebDNA] Need to convert unix date? (Govinda 2009)
  7. Re: [WebDNA] Need to convert unix date? (Dan Strong 2009)
  8. Re: [WebDNA] Need to convert unix date? ("Terry Wilson" 2009)
  9. Re: [WebDNA] Need to convert unix date? (Dan Strong 2009)
  10. Re: [WebDNA] Need to convert unix date? (Stuart Tremain 2009)
  11. Re: [WebDNA] Need to convert unix date? (Brian Fries 2009)
  12. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  13. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  14. Re: [WebDNA] Need to convert unix date? (Bob Minor 2009)
  15. Re: [WebDNA] Need to convert unix date? (Dan Strong 2009)
  16. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  17. Re: [WebDNA] Need to convert unix date? (Marc Thompson 2009)
  18. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  19. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  20. Re: [WebDNA] Need to convert unix date? (Marc Thompson 2009)
  21. Re: [WebDNA] Need to convert unix date? (Dan Strong 2009)
  22. Re: [WebDNA] Need to convert unix date? (David Bastedo 2009)
  23. Re: [WebDNA] Need to convert unix date? (Dan Strong 2009)
  24. [WebDNA] Need to convert unix date? (David Bastedo 2009)
Yeah same here... well, I don't have any further time to devote to this, but the problem to solve isn't really that difficult when you think about it: 1) There are 86400 seconds in a day. 2) 1252976934 (seconds) / 86400 (seconds) = 14502.xxxxxx, so 14503 since you want days, not specific time (right?) 3) You now would need to find the date that is 14503 days since 01/01/1970 and you could use [date] math to do it. I'm sure there's already code for this... -Dan On 12/15/2009 4:20 PM, David Bastedo wrote: > The timestamp *1252976934* corresponds to* 2009/09/14 06:08:54 pm PDT*. > > this is the time stamp: *1252976934* > > [format days_to_date %m/%d/%Y][format > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format][/format] > > gets me: 09/16/39 > > d. > > On Tue, Dec 15, 2009 at 6:54 PM, Dan Strong > wrote: > > Try this: > > [format days_to_date %m/%d/%Y][format > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format][/format] > > > > On 12/15/2009 3:47 PM, David Bastedo wrote: > > Hi, I need to convert a date stored in unix format - seconds > since Jan > 01, 1970. Is there a formula or function that anybody might have? > > I am pulling in an xml file generated by an external api and > that date > comes in this format. > > thanks. > > d. > > > -- > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > T. 416.603.2223 > M. 416.277.4499 > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: > http://forum.webdna.us/eucabb.html?page=topics&category=288 > > > > > > -- > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > T. 416.603.2223 > M. 416.277.4499 Dan Strong

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:

WebCatalog 3.0.4 alias crash bug? (2000) [WebDNA] PROBLEM WITH [SQL] (2009) WebCatalog can't find database (1997) Multi-processor Mac info ... (1997) Gil's in the lead (1999) WC Database Format (1997) Moment of Thanks (1997) Custom WebCat Prefs ... (1997) SQL (2004) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) WebCatalog can't find database (1997) Macos8.6 to X migration problems (2000) Line items in table cells (1997) Shell traceroute (2001) [WebDNA] Solution to PrivateTmp setting and "Sorry WebDNA server not (2019) Checkboxes (1998) [WebDNA] [WSC] WebDNA Development Summit (2014) WebCat control of Print (2001) [movefile] (1999) Possible Bug in 2.0b15.acgi (1997)