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

Home » Public Forums » archive » Re: Is there a default function return the day of a given month?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Is there a default function return the day of a given month? [message #79164] Tue, 07 February 2012 11:56
ben.bighair is currently offline  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
Re: Is there a default function return the day of a given month? [message #79165 is a reply to message #79164] Tue, 07 February 2012 11:44 Go to previous message
ben.bighair is currently offline  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
Re: Is there a default function return the day of a given month? [message #79166 is a reply to message #79165] Tue, 07 February 2012 11:44 Go to previous message
ben.bighair is currently offline  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
Re: Is there a default function return the day of a given month? [message #79170 is a reply to message #79165] Tue, 07 February 2012 05:27 Go to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
On Feb 6, 11:31 pm, Zhang Bo <bzhang20071...@gmail.com> wrote:
> Include Feb for leap years.

I'm not sure what you are asking for really. But whatever it is, some
combination of the functions JULDAY, BIN_DATE, and/or CALDAT is likely
to solve your problem.

--
Yngvar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: cgcontour and yticks
Next Topic: Coyote Graphics Pixmap is Available

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

Current Time: Wed Oct 08 15:16:57 PDT 2025

Total time taken to generate the page: 0.00640 seconds