[PLUG] Date Reformatting in Database Table
Rich Shepard
rshepard at appl-ecosys.com
Thu Oct 8 20:43:06 UTC 2009
I downloaded a database from an agency's Web site, and the date formats
are not that used by SQL (YYYY-MM-DD). Instead, they are in the form of
D/M/YYYY (or DD/MM/YYYY). Not only that, but the column they are in is the
second to last of 11 columns; a representative sample is:
1993-1|Water Quality|WVR|Yamhill, City of|Yamhill|Hamlin|Holt|Npv|NPDES-Waste Discharge Limits|7/6/1993|01993-1|Water Quality|WVR|Yamhill, City
of|Yamhill|Hamlin|Holt|Npv|NPDES-Waste Discharge Limits|7/6/1993|0
Is there a practical way to apply sed and/or awk to convert the date
column above from 7/6/1993 to 1993-06-07?
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the PLUG
mailing list