Re: Is there a default function return the day of a given month? [message #79164] |
Tue, 07 February 2012 11:56 |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Feb 6, 5:31 pm, Zhang Bo <bzhang20071...@gmail.com> wrote:
> Include Feb for leap years.
Hi,
Check out the C() format codes. http://star.pst.qub.ac.uk/idl/C()_Format_Code.html
IDL> PRINT, FORMAT='(C(CDI))',SYSTIME(/JULIAN)
7
If you need it stored into a variable then you can use STRING...
IDL> print, FIX(STRING(SYSTIME(/JULIAN), FORMAT='(C(CDI))'))*2
14
You have to provide the timestamp as one of IDL's julian day numbers.
Cheers,
ben
|
|
|
|
|
|