make a procedure that uses SUBST(,,) for the day, month and year.
PROCEDURE lp_ConvertDate(pc_Date)
lc_Day = SUBST(pc_Date,1,2)
DO CASE
CASE UPPER(SUBST(pc_Date,4,3)) = 'JAN'
lc_Mon = '01'
etc.
ENDCASE
lc_Year = SUBST(pc_Date,8,2)
RETURN CTOD(lc_Mon + '/' + lc_Day + '/' + '20' + lc_Year)
ENDPROC
Include a DO CASE... END CASE for the months where 'APR' would then
equal '04'
then paste the Month + '/' +Day + '/' +Year together and use CTOD() to
get the results:
Then create a select statement like this:
SELECT lp_ConvertDate(DateField) as newdate from bigtable into cursor
ac_NewResults
Philip
[EMAIL PROTECTED] wrote:
I have about a bazillion files that all have a date of something like
this:
15-Apr-05
How do I convert that to a usable date format?
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.