Not sure what the= "+1" is for from Dan's example besides adding an extra
day? =A0However, I put the code on my server so you could see it working.http://=webapps.utah.edu/test/temp.tpl
Seems to work fine on my server, which is -7DST.
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.
Marc
David Bastedo wrote:
> Unfortunately, I get: 09/16/3909 =A0with the code below:
>
> I'm trying to work through this . . .
>
> d.
>
>
> On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson> <mthompson@media.utah.edu <mailto:mthompson@media.utah.edu>> wrote:
>
> =A0 =A0 Here you go:
>
> =A0 =A0 [math]val=3D1252976934*1[/math] =3D [math date]{01/01/1970} + ={[format
> =A0 =A0 days_to_date %m/%d/%Y][format
> =A0 =A0 .6d][math]([val]/86400)+1[/math][/format][/format]}[/math]
>
> =A0 =A0 Marc
>
> =A0 =A0 David Bastedo wrote:
> =A0 =A0 > The timestamp *1252976934* corresponds to* 2009/09/14 06:=08:54 pm
> =A0 =A0 PDT*.
> =A0 =A0 >
> =A0 =A0 > this is the time stamp: *1252976934*
> =A0 =A0 >
> =A0 =A0 > [format days_to_date %m/%d/%Y][format
> =A0 =A0 > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format]=[/format]
> =A0 =A0 >
> =A0 =A0 > gets me: 09/16/39
> =A0 =A0 >
> =A0 =A0 > d.
> =A0 =A0 >
> =A0 =A0 > On Tue, Dec 15, 2009 at 6:54 PM, Dan Strong <webdna@danstrong.com
> =A0 =A0 <mailto:webdna@dans=trong.com>> =A0 =A0 > <mailto:webdna@danstrong.com <mailto:webdna@danstrong.com>>> wrote:> =A0 =A0 <mailto:talk@webdna=.us <mailto:talk@webdna.us>=>>.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Try this:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 [format days_to_date %m/%d/%Y][format
> =A0 =A0 > =A0 =A0 .6d][math]([your_UNIX_timestamp]/86400)+1[/math][=/format][/format]
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 On 12/15/2009 3:47 PM, David Bastedo wrote:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 Hi, I need to convert a date stored in un=ix format - seconds
> =A0 =A0 > =A0 =A0 =A0 =A0 since Jan
> =A0 =A0 > =A0 =A0 =A0 =A0 01, 1970. Is there a formula or function =that anybody
> =A0 =A0 might have?
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 I am pulling in an xml file generated by =an external api and
> =A0 =A0 > =A0 =A0 =A0 =A0 that date
> =A0 =A0 > =A0 =A0 =A0 =A0 comes in this format.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 thanks.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 d.
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 --
> =A0 =A0 > =A0 =A0 =A0 =A0 David Bastedo
> =A0 =A0 > =A0 =A0 =A0 =A0 Ten Plus One Communications Inc.
> =A0 =A0 > =A0 =A0 =A0 =A0 http://www.10plus1.com
> =A0 =A0 > =A0 =A0 =A0 =A0 T. =A0416.603.2223
> =A0 =A0 > =A0 =A0 =A0 =A0 M. 416.277.4499
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 -------------------------------------------------=--------
> =A0 =A0 > =A0 =A0 This message is sent to you because you are subsc=ribed to
> =A0 =A0 > =A0 =A0 the mailing list <talk@webdna.us <mailto:talk@=webdna.us>> =A0 =A0 > =A0 =A0 To unsubscribe, E-mail to: <=talk-leave@webdna.us> =A0 =A0 > =A0 =A0 <mailto:talk-leave@webdna.us <mailto:talk-leave@webdna.us>>>
> =A0 =A0 <mailto:talk-leave@=webdna.us>> =A0 =A0 > =A0 =A0 archives: http://mail.webdna.us/li=st/talk@webdna.us> =A0 =A0 marc.thompson@=utah.edu <mailto:marc.thom=pson@utah.edu>
> =A0 =A0 > =A0 =A0 old archives: http://dev.webdna.us/TalkListArchive/<=br>> =A0 =A0 > =A0 =A0 Bug Reporting:
> =A0 =A0 > =A0 =A0 http://forum.webdna.us/euc=abb.html?page=3Dtopics&category=3D288
> =A0 =A0 <http://forum.webdna.us/eucabb.html?=page=3Dtopics&category=3D288>
> =A0 =A0 > =A0 =A0 <http://forum.webdna.us=/eucabb.html?page=3Dtopics&category=3D288
> =A0 =A0 <http://forum.webdna.us/eucabb.html?=page=3Dtopics&category=3D288>>
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > --
> =A0 =A0 > David Bastedo
> =A0 =A0 > Ten Plus One Communications Inc.
> =A0 =A0 > http=://www.10plus1.com
> =A0 =A0 > T. =A0416.603.2223
> =A0 =A0 > M. 416.277.4499
>
> =A0 =A0 --
> =A0 =A0 -------------------------------------------
> =A0 =A0 Marc Thompson
> =A0 =A0 Software Engineer
> =A0 =A0 Office of Information Technology
> =A0 =A0 University of Utah
> =A0 =A0 801.585.9264> =A0 =A0 -------------------------------------------<=br>>--
>
>
>
> --
> David Bastedo
> Ten Plus One Communications Inc.
> http://www.10plus=1.com
> T. =A0416.603.2223
> M. 416.277.4499-----------------------------------------=--
Marc Thompson
Software Engineer
Office of Information Technology
University of Utah
801.585.9264
marc.thompson@utah.edu
-------------------------------------------
Not sure what the= "+1" is for from Dan's example besides adding an extra
day? =A0However, I put the code on my server so you could see it working.http://=webapps.utah.edu/test/temp.tpl
Seems to work fine on my server, which is -7DST.
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.
Marc
David Bastedo wrote:
> Unfortunately, I get: 09/16/3909 =A0with the code below:
>
> I'm trying to work through this . . .
>
> d.
>
>
> On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson> <mthompson@media.utah.edu <mailto:mthompson@media.utah.edu>> wrote:
>
> =A0 =A0 Here you go:
>
> =A0 =A0 [math]val=3D1252976934*1[/math] =3D [math date]{01/01/1970} + ={[format
> =A0 =A0 days_to_date %m/%d/%Y][format
> =A0 =A0 .6d][math]([val]/86400)+1[/math][/format][/format]}[/math]
>
> =A0 =A0 Marc
>
> =A0 =A0 David Bastedo wrote:
> =A0 =A0 > The timestamp *1252976934* corresponds to* 2009/09/14 06:=08:54 pm
> =A0 =A0 PDT*.
> =A0 =A0 >
> =A0 =A0 > this is the time stamp: *1252976934*
> =A0 =A0 >
> =A0 =A0 > [format days_to_date %m/%d/%Y][format
> =A0 =A0 > .6d][math]([your_UNIX_timestamp]/86400)+1[/math][/format]=[/format]
> =A0 =A0 >
> =A0 =A0 > gets me: 09/16/39
> =A0 =A0 >
> =A0 =A0 > d.
> =A0 =A0 >
> =A0 =A0 > On Tue, Dec 15, 2009 at 6:54 PM, Dan Strong <webdna@danstrong.com
> =A0 =A0 <mailto:webdna@dans=trong.com>> =A0 =A0 > <mailto:webdna@danstrong.com <mailto:webdna@danstrong.com>>> wrote:> =A0 =A0 <mailto:talk@webdna=.us <mailto:talk@webdna.us>=>>.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Try this:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 [format days_to_date %m/%d/%Y][format
> =A0 =A0 > =A0 =A0 .6d][math]([your_UNIX_timestamp]/86400)+1[/math][=/format][/format]
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 On 12/15/2009 3:47 PM, David Bastedo wrote:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 Hi, I need to convert a date stored in un=ix format - seconds
> =A0 =A0 > =A0 =A0 =A0 =A0 since Jan
> =A0 =A0 > =A0 =A0 =A0 =A0 01, 1970. Is there a formula or function =that anybody
> =A0 =A0 might have?
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 I am pulling in an xml file generated by =an external api and
> =A0 =A0 > =A0 =A0 =A0 =A0 that date
> =A0 =A0 > =A0 =A0 =A0 =A0 comes in this format.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 thanks.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 d.
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 --
> =A0 =A0 > =A0 =A0 =A0 =A0 David Bastedo
> =A0 =A0 > =A0 =A0 =A0 =A0 Ten Plus One Communications Inc.
> =A0 =A0 > =A0 =A0 =A0 =A0 http://www.10plus1.com
> =A0 =A0 > =A0 =A0 =A0 =A0 T. =A0416.603.2223
> =A0 =A0 > =A0 =A0 =A0 =A0 M. 416.277.4499
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 -------------------------------------------------=--------
> =A0 =A0 > =A0 =A0 This message is sent to you because you are subsc=ribed to
> =A0 =A0 > =A0 =A0 the mailing list <talk@webdna.us <mailto:talk@=webdna.us>> =A0 =A0 > =A0 =A0 To unsubscribe, E-mail to: <=talk-leave@webdna.us> =A0 =A0 > =A0 =A0 <mailto:talk-leave@webdna.us <mailto:talk-leave@webdna.us>>>
> =A0 =A0 <mailto:talk-leave@=webdna.us>> =A0 =A0 > =A0 =A0 archives: http://mail.webdna.us/li=st/talk@webdna.us> =A0 =A0 marc.thompson@=utah.edu <mailto:marc.thom=pson@utah.edu>
> =A0 =A0 > =A0 =A0 old archives: http://dev.webdna.us/TalkListArchive/<=br>> =A0 =A0 > =A0 =A0 Bug Reporting:
> =A0 =A0 > =A0 =A0 http://forum.webdna.us/euc=abb.html?page=3Dtopics&category=3D288
> =A0 =A0 <http://forum.webdna.us/eucabb.html?=page=3Dtopics&category=3D288>
> =A0 =A0 > =A0 =A0 <http://forum.webdna.us=/eucabb.html?page=3Dtopics&category=3D288
> =A0 =A0 <http://forum.webdna.us/eucabb.html?=page=3Dtopics&category=3D288>>
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > --
> =A0 =A0 > David Bastedo
> =A0 =A0 > Ten Plus One Communications Inc.
> =A0 =A0 > http=://www.10plus1.com
> =A0 =A0 > T. =A0416.603.2223
> =A0 =A0 > M. 416.277.4499
>
> =A0 =A0 --
> =A0 =A0 -------------------------------------------
> =A0 =A0 Marc Thompson
> =A0 =A0 Software Engineer
> =A0 =A0 Office of Information Technology
> =A0 =A0 University of Utah
> =A0 =A0 801.585.9264> =A0 =A0 -------------------------------------------<=br>>--
>
>
>
> --
> David Bastedo
> Ten Plus One Communications Inc.
> http://www.10plus=1.com
> T. =A0416.603.2223
> M. 416.277.4499-----------------------------------------=--
Marc Thompson
Software Engineer
Office of Information Technology
University of Utah
801.585.9264
marc.thompson@utah.edu
-------------------------------------------
DOWNLOAD WEBDNA NOW!
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...