Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Re: Date
Miscellaneous
Thread ID:
00655873
Message ID:
00656062
Views:
11
>>Hi All:
>> I have a datetime field and I want to change the year to 2002. How can I accomplish this?
>> I.E. 05/25/2001 5:25:23P.M. needs to be 05/25/2002 5:25:23 P.M.
>
>GOMONTH() accepts either a date or a datetime argument, so trivially:
>
>
REPLACE DateTimeFld WITH GOMONTH(DateTimeField,12)
>
>This also side-steps what to do with February 29th...

You'll loose a time portion because GOMONTH() always returns a date even for a datetime parameter.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform