Re: [WebDNA] Need to convert unix date?

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 104188
interpreted = N
texte = --0016e64b95b6968bb7047adfcfdc Content-Type: text/plain; charset=ISO-8859-1 what does: Math to use Date Display Format? do in the config? it is set to no? On Wed, Dec 16, 2009 at 5:08 PM, Bob Minor wrote: > 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)"? > > > > -Dan Strong > > http://www.DanStrong.com > > > > 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. > >> > >> ----- > >> [math]val=1252257406*1[/math] = [math date]{01/01/1970} + {[format > >> days_to_date %m/%d/%Y][format > >> .6d][math]([val]/86400)[/math][/format][/format]}[/math] > >> 1252257406=09/06/3909 > >> > >> I have deconstructed the original time stamp to: > >> > >> > >> [Math > >> > show=f]subTotal=[Math]{09/14/2009}[/math]-[Math]{01/01/1970}[/math][/math] > >> total time + days + 1 day - 5 hours > >> =[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]= > >> [reaction_published] > >> > >> so technically, if I do this in the reverse, I should get what I need . > . . > >> > >> d. > >> > >> > >> > >> > >> > >> > >> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson < > mthompson@media.utah.edu > >> > wrote: > >> > >> 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 > >> > >> 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 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=1252976934*1[/math] = [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=topics&category=288 > >> > >> > >> > > >> > > >> > >> > >> >> > >> > > > >> > > > >> > > > >> > > > >> > > -- > >> > > 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 > >> > >> -- > >> ------------------------------------------- > >> 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 > > --------------------------------------------------------- > > 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 > > --------------------------------------------------------- > 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 --0016e64b95b6968bb7047adfcfdc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable what does: Math to use Date Display Format? do in the config? it is set to = no?

On Wed, Dec 16, 2009 at 5:08 PM, Bob = Minor <bob@cyberm= ill.com> wrote:
Works on my serve= rs, 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 "Mo= nth/Date/Year (American)"?
>
> -Dan Strong
> http://www.DanS= trong.com
>
> 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 ha= ve
>> tried it on two different servers, so I am not sure what is up. >>
>> -----
>> [math]val=3D1252257406*1[/math] =3D [math date]{01/01/1970} + {[fo= rmat
>> days_to_date %m/%d/%Y][format
>> .6d][math]([val]/86400)[/math][/format][/format]}[/math]
>> 1252257406=3D09/06/3909
>>
>> I have deconstructed the original time stamp to:
>>
>>
>> [Math
>> show=3Df]subTotal=3D[Math]{09/14/2009}[/math]-[Math]{01/01/1970}[/= math][/math]
>> total time + days + 1 day - 5 hours
>> =3D[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]=3D
>> [reaction_published]
>>
>> so technically, if I do this in the reverse, I should get what I n= eed . . .
>>
>> d.
>>
>>
>>
>>
>>
>>
>> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson <mthompson@media.utah.edu
>> <mailto:mthompson@m= edia.utah.edu>> wrote:
>>
>> =A0 =A0Not sure what the "+1" is for from Dan's exam= ple besides adding an extra
>> =A0 =A0day? =A0However, I put the code on my server so you could s= ee it working.
>> =A0 =A0http://webapps.utah.edu/test/temp.tpl
>>
>> =A0 =A0Seems to work fine on my server, which is -7DST.
>>
>> =A0 =A0You would need to add some more formatting code to get it i= n the form
>> =A0 =A0you show in your previous post.
>> =A0 =A0ie. The timestamp 1252976934 corresponds to 2009/09/14 06:0= 8:54 pm PDT.
>>
>> =A0 =A0Marc
>>
>> =A0 =A0David Bastedo wrote:
>> =A0 =A0 > Unfortunately, I get: 09/16/3909 =A0with the code bel= ow:
>> =A0 =A0 >
>> =A0 =A0 > I'm trying to work through this . . .
>> =A0 =A0 >
>> =A0 =A0 > d.
>> =A0 =A0 >
>> =A0 =A0 >
>> =A0 =A0 > On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson
>> =A0 =A0 > <mthom= pson@media.utah.edu <mailto:mthompson@media.utah.edu>
>> =A0 =A0<mailto:mtho= mpson@media.utah.edu <mailto:mthompson@media.utah.edu>>>
>> =A0 =A0wrote:
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 Here you go:
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 [math]val=3D1252976934*1[/math] =3D [math dat= e]{01/01/1970} +
>> =A0 =A0{[format
>> =A0 =A0 > =A0 =A0 days_to_date %m/%d/%Y][format
>> =A0 =A0 > =A0 =A0 .6d][math]([val]/86400)+1[/math][/format][/fo= rmat]}[/math]
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 Marc
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 David Bastedo wrote:
>> =A0 =A0 > > The timestamp *1252976934* corresponds to* 2009/= 09/14 06:08:54 pm
>> =A0 =A0 > =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
>> =A0 =A0<webdna@danstron= g.com <mailto:webdna@danstro= ng.com>
>> =A0 =A0 > <mailto:we= bdna@danstrong.com <mailto:w= ebdna@danstrong.com>>
>> =A0 =A0 > > <mailto:webdna@danstrong.com <mailto:webdna@danstrong.com>
>> =A0 =A0<mailto:webdna@d= anstrong.com <mailto:webdna@= danstrong.com>>>> wrote:
>> =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 wro= te:
>> =A0 =A0 > >
>> =A0 =A0 > > =A0 =A0 =A0 =A0 Hi, I need to convert a date sto= red in unix format -
>> =A0 =A0seconds
>> =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 > =A0 =A0 might have?
>> =A0 =A0 > >
>> =A0 =A0 > > =A0 =A0 =A0 =A0 I am pulling in an xml file gene= rated by an external
>> =A0 =A0api 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 > > 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 subscribed to
>> =A0 =A0 > > =A0 =A0 the mailing list <talk@webdna.us <mailto:talk@webdna.us>
>> =A0 =A0<mailto:talk@webdna.us= <mailto:talk@webdna.us>>= ;
>> =A0 =A0 > <mailto:talk@web= dna.us <mailto:talk@webdna.us&= gt;
>> =A0 =A0<mailto:talk@webdna.us= <mailto:talk@webdna.us>>= ;>>.
>> =A0 =A0 > > =A0 =A0 To unsubscribe, E-mail to: <talk-leave@webdna.us
>> =A0 =A0<mailto:talk-lea= ve@webdna.us>
>> =A0 =A0 > <mailto:ta= lk-leave@webdna.us <mailto:t= alk-leave@webdna.us>>
>> =A0 =A0 > > <mailto:talk-leave@webdna.us <mailto:talk-leave@webdna.us>
>> =A0 =A0<mailto:talk-lea= ve@webdna.us <mailto:talk-le= ave@webdna.us>>>>
>> =A0 =A0 > > =A0 =A0 archives: http://mail.webdna.us/list/talk@w= ebdna.us
>> =A0 =A0 > > =A0 =A0 old archives: http://dev.webdna.us/TalkListArch= ive/
>> =A0 =A0 > > =A0 =A0 Bug Reporting:
>> =A0 =A0 > > http://forum.webdna.us/eu= cabb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>
>> =A0 =A0 > <http://forum.webdna.us/euc= abb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>>
>> =A0 =A0 > > <http://forum.webdna.u= s/eucabb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>
>> =A0 =A0 > <http://forum.webdna.us/euc= abb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?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 --
>> =A0 =A0 > =A0 =A0 ------------------------------------------- >> =A0 =A0 > =A0 =A0 Marc Thompson
>> =A0 =A0 > =A0 =A0 Software Engineer
>> =A0 =A0 > =A0 =A0 Office of Information Technology
>> =A0 =A0 > =A0 =A0 University of Utah
>> =A0 =A0 > =A0 =A0 801.585.9264
>> =A0 =A0 > marc.thomps= on@utah.edu <mailto:marc.t= hompson@utah.edu>
>> =A0 =A0<mailto:marc.t= hompson@utah.edu <mailto:m= arc.thompson@utah.edu>>
>> =A0 =A0 > =A0 =A0 ------------------------------------------- >> =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 =A0Marc Thompson
>> =A0 =A0Software Engineer
>> =A0 =A0Office of Information Technology
>> =A0 =A0University of Utah
>> =A0 =A0801.585.9264
>> =A0 =A0marc.thompson@uta= h.edu <mailto:marc.thompso= n@utah.edu>
>> =A0 =A0-------------------------------------------
>>
>>
>>
>>
>> --
>> David Bastedo
>> Ten Plus One Communications Inc.
>> http://www.10= plus1.com
>> T. =A0416.603.2223
>> M. 416.277.4499
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us<= /a>>.
> To unsubscribe, E-mail to: <
talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us
> old archives: http://dev.webdna.us/TalkListArchive/
> Bug Reporting: http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288

---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g= t;.
To unsubscribe, E-mail to: <talk= -leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?pa= ge=3Dtopics&category=3D288



--
David Baste= do
Ten Plus One Communications Inc.
http://www.10plus1.com
T. =A0416.603.2223
M. 416.277.4499
--0016e64b95b6968bb7047adfcfdc-- 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)
--0016e64b95b6968bb7047adfcfdc Content-Type: text/plain; charset=ISO-8859-1 what does: Math to use Date Display Format? do in the config? it is set to no? On Wed, Dec 16, 2009 at 5:08 PM, Bob Minor wrote: > 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)"? > > > > -Dan Strong > > http://www.DanStrong.com > > > > 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. > >> > >> ----- > >> [math]val=1252257406*1[/math] = [math date]{01/01/1970} + {[format > >> days_to_date %m/%d/%Y][format > >> .6d][math]([val]/86400)[/math][/format][/format]}[/math] > >> 1252257406=09/06/3909 > >> > >> I have deconstructed the original time stamp to: > >> > >> > >> [Math > >> > show=f]subTotal=[math]{09/14/2009}[/math]-[math]{01/01/1970}[/math][/math] > >> total time + days + 1 day - 5 hours > >> =[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]= > >> [reaction_published] > >> > >> so technically, if I do this in the reverse, I should get what I need . > . . > >> > >> d. > >> > >> > >> > >> > >> > >> > >> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson < > mthompson@media.utah.edu > >> > wrote: > >> > >> 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 > >> > >> 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 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=1252976934*1[/math] = [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=topics&category=288 > >> > >> > >> > > >> > > >> > >> > >> >> > >> > > > >> > > > >> > > > >> > > > >> > > -- > >> > > 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 > >> > >> -- > >> ------------------------------------------- > >> 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 > > --------------------------------------------------------- > > 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 > > --------------------------------------------------------- > 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 --0016e64b95b6968bb7047adfcfdc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable what does: Math to use Date Display Format? do in the config? it is set to = no?

On Wed, Dec 16, 2009 at 5:08 PM, Bob = Minor <bob@cyberm= ill.com> wrote:
Works on my serve= rs, 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 "Mo= nth/Date/Year (American)"?
>
> -Dan Strong
> http://www.DanS= trong.com
>
> 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 ha= ve
>> tried it on two different servers, so I am not sure what is up. >>
>> -----
>> [math]val=3D1252257406*1[/math] =3D [math date]{01/01/1970} + {[fo= rmat
>> days_to_date %m/%d/%Y][format
>> .6d][math]([val]/86400)[/math][/format][/format]}[/math]
>> 1252257406=3D09/06/3909
>>
>> I have deconstructed the original time stamp to:
>>
>>
>> [Math
>> show=3Df]subTotal=3D[math]{09/14/2009}[/math]-[math]{01/01/1970}[/= math][/math]
>> total time + days + 1 day - 5 hours
>> =3D[math]([subTotal]*86400)+{06:08:54}+86400-18000[/math]=3D
>> [reaction_published]
>>
>> so technically, if I do this in the reverse, I should get what I n= eed . . .
>>
>> d.
>>
>>
>>
>>
>>
>>
>> On Wed, Dec 16, 2009 at 4:01 PM, Marc Thompson <mthompson@media.utah.edu
>> <mailto:mthompson@m= edia.utah.edu>> wrote:
>>
>> =A0 =A0Not sure what the "+1" is for from Dan's exam= ple besides adding an extra
>> =A0 =A0day? =A0However, I put the code on my server so you could s= ee it working.
>> =A0 =A0http://webapps.utah.edu/test/temp.tpl
>>
>> =A0 =A0Seems to work fine on my server, which is -7DST.
>>
>> =A0 =A0You would need to add some more formatting code to get it i= n the form
>> =A0 =A0you show in your previous post.
>> =A0 =A0ie. The timestamp 1252976934 corresponds to 2009/09/14 06:0= 8:54 pm PDT.
>>
>> =A0 =A0Marc
>>
>> =A0 =A0David Bastedo wrote:
>> =A0 =A0 > Unfortunately, I get: 09/16/3909 =A0with the code bel= ow:
>> =A0 =A0 >
>> =A0 =A0 > I'm trying to work through this . . .
>> =A0 =A0 >
>> =A0 =A0 > d.
>> =A0 =A0 >
>> =A0 =A0 >
>> =A0 =A0 > On Wed, Dec 16, 2009 at 11:17 AM, Marc Thompson
>> =A0 =A0 > <mthom= pson@media.utah.edu <mailto:mthompson@media.utah.edu>
>> =A0 =A0<mailto:mtho= mpson@media.utah.edu <mailto:mthompson@media.utah.edu>>>
>> =A0 =A0wrote:
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 Here you go:
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 [math]val=3D1252976934*1[/math] =3D [math dat= e]{01/01/1970} +
>> =A0 =A0{[format
>> =A0 =A0 > =A0 =A0 days_to_date %m/%d/%Y][format
>> =A0 =A0 > =A0 =A0 .6d][math]([val]/86400)+1[/math][/format][/fo= rmat]}[/math]
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 Marc
>> =A0 =A0 >
>> =A0 =A0 > =A0 =A0 David Bastedo wrote:
>> =A0 =A0 > > The timestamp *1252976934* corresponds to* 2009/= 09/14 06:08:54 pm
>> =A0 =A0 > =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
>> =A0 =A0<webdna@danstron= g.com <mailto:webdna@danstro= ng.com>
>> =A0 =A0 > <mailto:we= bdna@danstrong.com <mailto:w= ebdna@danstrong.com>>
>> =A0 =A0 > > <mailto:webdna@danstrong.com <mailto:webdna@danstrong.com>
>> =A0 =A0<mailto:webdna@d= anstrong.com <mailto:webdna@= danstrong.com>>>> wrote:
>> =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 wro= te:
>> =A0 =A0 > >
>> =A0 =A0 > > =A0 =A0 =A0 =A0 Hi, I need to convert a date sto= red in unix format -
>> =A0 =A0seconds
>> =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 > =A0 =A0 might have?
>> =A0 =A0 > >
>> =A0 =A0 > > =A0 =A0 =A0 =A0 I am pulling in an xml file gene= rated by an external
>> =A0 =A0api 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 > > 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 subscribed to
>> =A0 =A0 > > =A0 =A0 the mailing list <talk@webdna.us <mailto:talk@webdna.us>
>> =A0 =A0<mailto:talk@webdna.us= <mailto:talk@webdna.us>>= ;
>> =A0 =A0 > <mailto:talk@web= dna.us <mailto:talk@webdna.us&= gt;
>> =A0 =A0<mailto:talk@webdna.us= <mailto:talk@webdna.us>>= ;>>.
>> =A0 =A0 > > =A0 =A0 To unsubscribe, E-mail to: <talk-leave@webdna.us
>> =A0 =A0<mailto:talk-lea= ve@webdna.us>
>> =A0 =A0 > <mailto:ta= lk-leave@webdna.us <mailto:t= alk-leave@webdna.us>>
>> =A0 =A0 > > <mailto:talk-leave@webdna.us <mailto:talk-leave@webdna.us>
>> =A0 =A0<mailto:talk-lea= ve@webdna.us <mailto:talk-le= ave@webdna.us>>>>
>> =A0 =A0 > > =A0 =A0 archives: http://mail.webdna.us/list/talk@w= ebdna.us
>> =A0 =A0 > > =A0 =A0 old archives: http://dev.webdna.us/TalkListArch= ive/
>> =A0 =A0 > > =A0 =A0 Bug Reporting:
>> =A0 =A0 > > http://forum.webdna.us/eu= cabb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>
>> =A0 =A0 > <http://forum.webdna.us/euc= abb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>>
>> =A0 =A0 > > <http://forum.webdna.u= s/eucabb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288>
>> =A0 =A0 > <http://forum.webdna.us/euc= abb.html?page=3Dtopics&category=3D288
>> =A0 =A0<http://forum.webdna.us/eucabb.ht= ml?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 --
>> =A0 =A0 > =A0 =A0 ------------------------------------------- >> =A0 =A0 > =A0 =A0 Marc Thompson
>> =A0 =A0 > =A0 =A0 Software Engineer
>> =A0 =A0 > =A0 =A0 Office of Information Technology
>> =A0 =A0 > =A0 =A0 University of Utah
>> =A0 =A0 > =A0 =A0 801.585.9264
>> =A0 =A0 > marc.thomps= on@utah.edu <mailto:marc.t= hompson@utah.edu>
>> =A0 =A0<mailto:marc.t= hompson@utah.edu <mailto:m= arc.thompson@utah.edu>>
>> =A0 =A0 > =A0 =A0 ------------------------------------------- >> =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 =A0Marc Thompson
>> =A0 =A0Software Engineer
>> =A0 =A0Office of Information Technology
>> =A0 =A0University of Utah
>> =A0 =A0801.585.9264
>> =A0 =A0marc.thompson@uta= h.edu <mailto:marc.thompso= n@utah.edu>
>> =A0 =A0-------------------------------------------
>>
>>
>>
>>
>> --
>> David Bastedo
>> Ten Plus One Communications Inc.
>> http://www.10= plus1.com
>> T. =A0416.603.2223
>> M. 416.277.4499
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us<= /a>>.
> To unsubscribe, E-mail to: <
talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us
> old archives: http://dev.webdna.us/TalkListArchive/
> Bug Reporting: http://forum.webdna.us/eucabb.ht= ml?page=3Dtopics&category=3D288

---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g= t;.
To unsubscribe, E-mail to: <talk= -leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?pa= ge=3Dtopics&category=3D288



--
David Baste= do
Ten Plus One Communications Inc.
http://www.10plus1.com
T. =A0416.603.2223
M. 416.277.4499
--0016e64b95b6968bb7047adfcfdc-- David Bastedo

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:

WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Webcat Manual and TeaRoom Examples Uses Different Examples. (1997) windows file upload = weirdness (2004) Using Eudora instead of Emailer, and cron facility (1998) 2.0Beta Command Ref (can't find this instruction) (1997) WebCat2 - [include] tags (1997) Use of & in text areas.... (1998) mac hack (1997) WC2.0 Memory Requirements (1997) Tax on shipping (1998) [WebDNA] WebDNA and Google Geo Tagging (2012) Shownext never shows next...still (1997) How is it done? (1998) Dismissing dialogs (was 2.1b3 --> way slow) (1997) Harvesting invalid email addresses from bounced emails??? (2000) Strange intermittent WebDNA problems (2008) Sorting by date (1997) User Authentication (2003) different ship dates and shopping carts -- how to? (1997) Cookies and webcat (1997)