dates

Moderator: Rathinagiri

Post Reply
Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

dates

Post by Templar » 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

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Fri Apr 13, 2018 6:54 pm

Ah: forget that. I've sorted it... D'oh!
Templar

User avatar
andyglezl
Posts: 1027
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 21 times
Been thanked: 42 times
Contact:

Post by andyglezl » 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:
Andrés González López
Desde Guadalajara, Jalisco. México.

jozef
Posts: 20
Joined: Sat Apr 02, 2016 4:53 pm
DBs Used: DBF
Location: Bratislava, Slovak Republic
Has thanked: 11 times
Been thanked: 1 time

Post by jozef » Sat Apr 14, 2018 11:31 am

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: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Mon Apr 16, 2018 1:51 pm

Thanks, Jozef. I realised that a few seconds after posting the question!! Thanks for your help, though
Templat

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Mon Apr 16, 2018 1:52 pm

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