dates

Moderator: Rathinagiri

Post Reply
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

dates

Post 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
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: dates

Post by Templar »

Ah: forget that. I've sorted it... D'oh!
Templar
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: dates

Post 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:
Andrés González López
Desde Guadalajara, Jalisco. México.
jozef
Posts: 23
Joined: Sat Apr 02, 2016 4:53 pm
DBs Used: DBF
Location: Bratislava, Slovak Republic

Re: dates

Post 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
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: dates

Post by Templar »

Thanks, Jozef. I realised that a few seconds after posting the question!! Thanks for your help, though
Templat
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: dates

Post 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!
Post Reply