Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update SQL Sentece 2

Status
Not open for further replies.

forostec

Programmer
Oct 5, 2004
13
0
0
CO
Hello, recently i upload an excel file into a table but i have some problems with a date field where i have this:

02/09/0200

how can i update the table field to this current year?

Thanks for the help.
 
If you have a copy of FoxPro you can open the table and run:

Code:
REPLACE ALL DateFldName WITH ;
     CTOD(STR(MONTH(DateFldName)) + "/" + ;
          STR(DAY(DateFldName)) +  "/" + ;
          YEAR(DATE())) ;
   FOR DateFldName = {02/09/0200}

_RAS
VFP MVP
 
Or...

UPDATE tablename ;
SET DateFldName = ;
CTOD(STR(MONTH(DateFldName)) + "/" + ;
STR(DAY(DateFldName)) + "/" + ;
YEAR(DATE())) ;
WHERE DateFldName = {02/09/0200}

Darrell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top