comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: sky is falling, again ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: sky is falling, again ? [message #75618 is a reply to message #75616] Wed, 16 March 2011 07:54 Go to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
nata <bernat.puigdomenech@gmail.com> wrote:

> Hi folks,
>
> I'm converting julian dates to text, using the calendar format. So,
> for example:
> time_text=2455636.937500d
>
> PRINT, STRING(time_text,FORMAT='(C(CDI2.2,"/",CMOI2.2,"/",CYI,"
> ",CHI2.2,":",CMI2.2))')
>
> CALDAT, time_text, mo, dd, yy, hh, mm
> PRINT, STRTRIM(dd,2)+"/"+STRTRIM(mo,2)+"/"+STRTRIM(yy,2)+"
> "+STRTRIM(hh,2)+":"+STRTRIM(mm,2)
>
> 16/03/2011 10:29
> 16/03/2011 10:30
>
> Lol ! There is 1 minute difference !!!! Do you know why ?

If you use
PRINT, STRING(time_text,FORMAT='(C(CDI2.2,"/",CMOI2.2,"/",CYI,"
",CHI2.2,":",CMI2.2,":",CSI2.2))')
to print time_text
you'll get
16/03/2011 10:29:59
with the number of milliseconds missing. But you are close to
the next minute.
As usual with quantized values, the last digit may be wrong.

Norbert
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Help menu in 8.0
Next Topic: satellite data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:55:59 PDT 2025

Total time taken to generate the page: 0.00436 seconds