Page 1 of 1

dates

Posted: Fri Apr 13, 2018 6:49 pm
by Templar
Consider this:
DD:=CTOD("12/04/2018")
DC:=DTOC(DD)
@1,1 SAY LEN(DC)

This returns a value of 8, because it reduces the year to two figures. If I want to keep a 4 figure year, how do I do this? We need to start preparing for any Y3K problems.... !

Templar

Re: dates

Posted: Fri Apr 13, 2018 6:54 pm
by Templar
Ah: forget that. I've sorted it... D'oh!
Templar

Re: dates

Posted: Fri Apr 13, 2018 7:43 pm
by andyglezl
preparing for any Y3K problems.... !

A mi me gustaría poder vivir esos años para ver si se resolvió el problema... :o :lol:
------------------------------------------------------------------------------------------------------------
I would like to be able to live those years to see if the problem was solved ... :o :lol:

Re: dates

Posted: Sat Apr 14, 2018 11:31 am
by jozef
Templar wrote: Fri Apr 13, 2018 6:49 pm Consider this:
DD:=CTOD("12/04/2018")
DC:=DTOC(DD)
@1,1 SAY LEN(DC)

This returns a value of 8, because it reduces the year to two figures. If I want to keep a 4 figure year, how do I do this? We need to start preparing for any Y3K problems.... !

Templar
Try command

SET CENTURY ON // you see year as 4 digits
SET CENTURY OFF // you see year as 2 digits

I think default is OFF

Jozef

Re: dates

Posted: Mon Apr 16, 2018 1:51 pm
by Templar
Thanks, Jozef. I realised that a few seconds after posting the question!! Thanks for your help, though
Templat

Re: dates

Posted: Mon Apr 16, 2018 1:52 pm
by Templar
andyglezl wrote: Fri Apr 13, 2018 7:43 pm
preparing for any Y3K problems.... !

A mi me gustaría poder vivir esos años para ver si se resolvió el problema... :o :lol:
------------------------------------------------------------------------------------------------------------
I would like to be able to live those years to see if the problem was solved ... :o :lol:
I am determined to do so!