Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing years in a date field
Message
 
 
To
16/09/2002 18:06:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00701006
Message ID:
00701010
Views:
18
Try
REPLACE datefield WITH GOMONTH(datefield, 12*100) ;
     FOR datefield < DATE(1980,01,01)

>Hey everyone,
>I was wondering if there was an easy way to replace the year function in a field. What I have is a table with a field that contains dates. The problem though is that the dates begin in 1980 and end in 2002. The dates after the century mark are showing up as 1900, 1901, 1902, however. My question is:
>How can I replace those dates that have 1900, 1901, 1902 with 2000, 2001, 2002. For example: Change 1/1/1901 t0 1/1/2001 in an efficient manner?
>
>Any suggestions would be appreciated. THanks.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform