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 #72452] Thu, 09 September 2010 19:21 Go to previous message
mkmvarma is currently offline  mkmvarma
Messages: 24
Registered: November 2007
Junior Member
On Sep 10, 1:05 pm, Ben Tupper <ben.bigh...@gmail.com> wrote:
> 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

Thanks very much, Ben. It worked.. I had to use STRMID though ....
Mahesh
[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 10 14:53:34 PDT 2025

Total time taken to generate the page: 0.40064 seconds