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 #92256 is a reply to message #92255] Thu, 05 November 2015 15:02 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 11/05/2015 11:47 AM, lucesmm@gmail.com wrote:
> Hello I have a problem and I am trying to see if IDL can solve this
>
> I have an initial date
> 08/05/2012 05:14:39
>
> and then my data is arrange in days and fractions of days
> DAY
> 9.77013 -> meaning 9.77013 days after the initial date
> 9.77037
> 9.77060
> 9.77083
> 9.77106
> 9.77130
> 9.77153
> 9.77175
> 9.77199
> 9.77222
> 9.77245
>
> is there a way that IDL can help me to convert each point to real
> date
and time given the start date and time ?
>
>
> Thanks
>

Yes, convert to Julian days:

IDL> dates = [9.77013, 9.77037, 9.77060, 9.77083, 9.77106, 9.77130,
9.77153, 9.77175, 9.77199, 9.77222, 9.77245]
IDL> jd = julday(8, 5, 2012, 5, 14, 39)
% Compiled module: JULDAY.
IDL> jdates = jd + dates
IDL> caldat, jdates, months, days, years, hours, minutes, seconds
% Compiled module: CALDAT.
IDL> print, hours
23 23 23 23 23
23 23
23 23 23 23
IDL> print, minutes
43 43 44 44 44
45 45
45 46 46 46
IDL> print, seconds
38.245639 58.927402 18.867587 38.725375
58.583163
19.347323 39.205112 58.238925 18.920688
38.778476
58.718661

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.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:59:11 PDT 2025

Total time taken to generate the page: 0.00375 seconds