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

Home » Public Forums » archive » Re: date format
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: date format [message #72453 is a reply to message #72452] Thu, 09 September 2010 18:05 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On 9/9/10 6:51 PM, mahesh wrote:
> Hi,
> Is there any way I can change the date format from '970625' to
> '19970625' in IDL?
> Thanks,
> Mahesh

Hi,

I hesitate to give the easy answer, but what the heck. IDL can do
string math so the following works a treat.

dateString = '970625'
newDateString = '19' + dateString


But if you really need to do date math then you need to split the string
into a 2-digit-year, a month and a day using STRMID. Add the century
(1900) to the 2-digit date. Then you run the while thing JULDAY before
doing math on it.

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Previous Topic: date format
Next Topic: reverse color table

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

Current Time: Fri Oct 17 21:31:35 PDT 2025

Total time taken to generate the page: 0.15990 seconds