FoxPro 6.0 Update Year in the datetime field

Hello,
I can get  Year from FroPro 6.0


Select Year(Datetime) from Customer

I get year from all the rows.I need to update just Year in the Field How can I do that.

ASPDEVAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ksparkyCommented:
Have you tried
UPDATE Customer Set Datetime + 365.25

OR

UPDATE Customer Set Datetime = CTOD(allt(str(Month(Datetime))) + "/" + allt(str(Day(Datetime)) + "/" + allt(str(Year(Datetime)+1)))

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ASPDEVAuthor Commented:
How can I update just year:

e.g
02/09/2007 01:50

I need to change year from 2007 to 2010
like 02/09/2010 01:50
ASPDEVAuthor Commented:
It worked, but I'm missing the TimeStamp, I get 00:00.

Needed valid ones like 01:50

HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

ASPDEVAuthor Commented:
I got it:

UPDATE Customer Set Datetime = CTOT(allt(str(Month(Datetime))) + "/" + allt(str(Day(Datetime))) + "/" + allt(str(Year(Datetime)+3)))) + allt(str(hour(datetime))) + ":" + allt(str(minute(datetime))))
ASPDEVAuthor Commented:
Thanks
pcelbaCommented:
Above formula could fail when you try to update February 29th.

Shorter and region independent syntax is:

UPDATE Customer Set Datetime = DTOT(GOMONTH(Datetime, 36)) + (Datetime-DTOT(TTOD(Datetime)))

ASPDEVAuthor Commented:
Cool, it worked as well.

Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.