What is WebDNA

WebDNA is a scripting and database system designed to easily build web applications.

WebDNA and BioType

BioType service is a biometric keystroke dynamic system. It will be part of WebDNA 8.5

Download WebDNA

Download WebDNA freeware, try it and register later if you want.

WebDNA resources

The list of all WebDNA instructions.
WebDNA
Software Corporation
Search WebDNA Site
 Menu


HOME


DOWNLOADS


LEARN


EDUCATION


NEWS


COMMUNITY


STORE


SUPPORT


CONTACT

Re: [WebDNA] Need to convert unix date?

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 104184
interpreted = N
texte = Works on my servers, must be a config issue! On Dec 16, 2009, at 3:58 PM, Dan Strong wrote: > What is your date format set to in your WebDNA admin? Mine is = "Month/Date/Year (American)"? >=20 > -Dan Strong > http://www.DanStrong.com >=20 > On 12/16/2009 1:55 PM, David Bastedo wrote: >> So when I put that code on my server, I get 3909 as the year. I have >> tried it on two different servers, so I am not sure what is up. >>=20 >> ----- >> [math]val=3D1252257406*1[/math] =3D [math date]{01/01/1970} + = {[format >> days_to_date %m/%d/%Y][format >> .6d][math]([val]/86400)[/math][/format][/format]}[/math] >> 1252257406=3D09/06/3909 >>=20 >> I have deconstructed the original time stamp to: >>=20 >>=20 >> [Math >> = show=3Df]subTotal=3D[Math]{09/14/2009}[/math]-[Math]{01/01/1970}[/math][/m= ath] >> total time + days + 1 day - 5 hours >> =3D[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]=3D >> [reaction_published] >>=20 >> so technically, if I do this in the reverse, I should get what I need = . . . >>=20 >> d. >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson = > > wrote: >>=20 >> Not sure what the "+1" is for from Dan's example besides adding an = extra >> day? However, I put the code on my server so you could see it = working. >> http://webapps.utah.edu/test/temp.tpl >>=20 >> Seems to work fine on my server, which is -7DST. >>=20 >> You would need to add some more formatting code to get it in the = form >> you show in your previous post. >> ie. The timestamp 1252976934 corresponds to 2009/09/14 06:08:54 pm = PDT. >>=20 >> Marc >>=20 >> David Bastedo wrote: >> > Unfortunately, I get: 09/16/3909 with the code below: >> > >> > I'm trying to work through this . . . >> > >> > d. >> > >> > >> > On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson >> > >> >> >> wrote: >> > >> > Here you go: >> > >> > [math]val=3D1252976934*1[/math] =3D [math date]{01/01/1970} = + >> {[format >> > days_to_date %m/%d/%Y][format >> > .6d][math]([val]/86400)+1[/math][/format][/format]}[/math] >> > >> > Marc >> > >> > 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=3Dtopics&category=3D288= >> >> > > > >> > > > >> > > >> >> > > >> > > >> > > >> > > >> > > -- >> > > David Bastedo >> > > Ten Plus One Communications Inc. >> > > http://www.10plus1.com >> > > T. 416.603.2223 >> > > M. 416.277.4499 >> > >> > -- >> > ------------------------------------------- >> > Marc Thompson >> > Software Engineer >> > Office of Information Technology >> > University of Utah >> > 801.585.9264 >> > marc.thompson@utah.edu >> > >> > ------------------------------------------- >> > >> > >> > >> > >> > -- >> > David Bastedo >> > Ten Plus One Communications Inc. >> > http://www.10plus1.com >> > T. 416.603.2223 >> > M. 416.277.4499 >>=20 >> -- >> ------------------------------------------- >> Marc Thompson >> Software Engineer >> Office of Information Technology >> University of Utah >> 801.585.9264 >> marc.thompson@utah.edu >> ------------------------------------------- >>=20 >>=20 >>=20 >>=20 >> -- >> 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=3Dtopics&category=3D288 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)
Works on my servers, must be a config issue! On Dec 16, 2009, at 3:58 PM, Dan Strong wrote: > What is your date format set to in your WebDNA admin? Mine is = "Month/Date/Year (American)"? >=20 > -Dan Strong > http://www.DanStrong.com >=20 > On 12/16/2009 1:55 PM, David Bastedo wrote: >> So when I put that code on my server, I get 3909 as the year. I have >> tried it on two different servers, so I am not sure what is up. >>=20 >> ----- >> [math]val=3D1252257406*1[/math] =3D [math date]{01/01/1970} + = {[format >> days_to_date %m/%d/%Y][format >> .6d][math]([val]/86400)[/math][/format][/format]}[/math] >> 1252257406=3D09/06/3909 >>=20 >> I have deconstructed the original time stamp to: >>=20 >>=20 >> [Math >> = show=3Df]subTotal=3D[math]{09/14/2009}[/math]-[math]{01/01/1970}[/math][/m= ath] >> total time + days + 1 day - 5 hours >> =3D[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]=3D >> [reaction_published] >>=20 >> so technically, if I do this in the reverse, I should get what I need = . . . >>=20 >> d. >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson = > > wrote: >>=20 >> Not sure what the "+1" is for from Dan's example besides adding an = extra >> day? However, I put the code on my server so you could see it = working. >> http://webapps.utah.edu/test/temp.tpl >>=20 >> Seems to work fine on my server, which is -7DST. >>=20 >> You would need to add some more formatting code to get it in the = form >> you show in your previous post. >> ie. The timestamp 1252976934 corresponds to 2009/09/14 06:08:54 pm = PDT. >>=20 >> Marc >>=20 >> David Bastedo wrote: >> > Unfortunately, I get: 09/16/3909 with the code below: >> > >> > I'm trying to work through this . . . >> > >> > d. >> > >> > >> > On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson >> > >> >> >> wrote: >> > >> > Here you go: >> > >> > [math]val=3D1252976934*1[/math] =3D [math date]{01/01/1970} = + >> {[format >> > days_to_date %m/%d/%Y][format >> > .6d][math]([val]/86400)+1[/math][/format][/format]}[/math] >> > >> > Marc >> > >> > 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=3Dtopics&category=3D288= >> >> > > > >> > > > >> > > >> >> > > >> > > >> > > >> > > >> > > -- >> > > David Bastedo >> > > Ten Plus One Communications Inc. >> > > http://www.10plus1.com >> > > T. 416.603.2223 >> > > M. 416.277.4499 >> > >> > -- >> > ------------------------------------------- >> > Marc Thompson >> > Software Engineer >> > Office of Information Technology >> > University of Utah >> > 801.585.9264 >> > marc.thompson@utah.edu >> > >> > ------------------------------------------- >> > >> > >> > >> > >> > -- >> > David Bastedo >> > Ten Plus One Communications Inc. >> > http://www.10plus1.com >> > T. 416.603.2223 >> > M. 416.277.4499 >>=20 >> -- >> ------------------------------------------- >> Marc Thompson >> Software Engineer >> Office of Information Technology >> University of Utah >> 801.585.9264 >> marc.thompson@utah.edu >> ------------------------------------------- >>=20 >>=20 >>=20 >>=20 >> -- >> 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=3Dtopics&category=3D288 Bob Minor

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:

Save Word/Excel Docs to Server (2002) Image size & weight limit on upload (2002) New Site Announcement: MusicianStore.com goes live with (1998) WC1.6 to WC2 date formatting (1997) Error Msg (1997) GuestBook example (1997) Changing price for a SLU based on options (size, etc.) (1997) Answer: WebDelivery downloads alias, not original ? (1997) Apache 2 (2003) bug report -- leading < character (1998) Not really WebCat (1997) WebCat and WebTV (1997) WebCat2: Master Counter snippet (1997) Before I Can Begin . . . (1998) possible, WebCat2.0 and checkboxes-restated (1997) Sort Order on a page search (1997) WebCatalog for Postcards ? (1997) Hyperlink in email (2002) Showif date range comparison (1999) WebDNA Threaded Discussions? (2004)