Replacing the year within a date field - TechRepublic
General discussion
November 4, 2002 at 03:34 AM
abcs

Replacing the year within a date field

by abcs . Updated 23 years, 8 months ago

Hi to anyone,

I have an old foxpro database with a field defined as follows:
invdte Date 8
When I set century on the year for some records show as 1900, 1901, 1902 etc.
I want to replace the year portion with 2000, 2001, 2002 etc.

I am using the following syntax and it is not working. Help
replace substr(dtoc(invdte),7,4) with “2000”
This does not work on a date field. What am I doing wrong.
TIA
Robert Payne

This discussion is locked

All Comments