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

Home » Public Forums » archive » Dates conversions
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: Dates conversions [message #92258 is a reply to message #92257] Thu, 05 November 2015 15:15 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
On Thursday, 5 November 2015 15:08:18 UTC-8, Dick Jackson wrote:
>
> This should do it.
>
> d0Str = '08/05/2012 05:14:39'
>
> ;; Assuming mm/dd/yyyy: correct?
>
> d0Jul = 0.0D ; Initialize to Double for millisecond accuracy
> ReadS, d0Str, d0Jul, $
> Format='(C(CMOI2,X,CDI2,X,CYI4,X,CHI2,X,CMI2,X,CSI2))'
>
> dOffsets = [9.77013, 9.77037, 9.77060, 9.77083, 9.77106, 9.77130, 9.77153, $
> 9.77175, 9.77199, 9.77222, 9.77245]
>
> dJuls = d0Jul + dOffsets
>
> Print, [d0Jul, dJuls], $
> Format='(C(CMOI2.2,"/",CDI2.2,"/",CYI4.4,X,CHI2.2,":",CMI2.2, ":",CSI2.2))'

As you can see (Hi, Mike!), there's a couple of ways to go about it. I should have made it clear that the variables "d0Jul" and "dJuls" were referring to Julian Day numbers for your "day 0" and the set of date/times that you're computing from the offsets. For more, see:

http://exelisvis.com/docs/Date_Time_Data.html
http://exelisvis.com/docs/Format_Codes.html#files_2839720996 _2823814

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: correlation question
Next Topic: testing IDL_IDLBridge status

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

Current Time: Wed Oct 08 13:55:49 PDT 2025

Total time taken to generate the page: 0.00394 seconds