Take a look at this code. I allow users to key in date like 1030 for
10/30/2008, etc. The code always assumes dates to be in *USA/*MDY
format unless you give the date in a obvious format.
http://code.midrange.com/5c554fd6c3.html
http://code.midrange.com/ea8f077873.html
Thanks, Matt
-----Original Message-----
From: Mike [mailto:koldark@xxxxxxxxx]
Sent: Thursday, October 23, 2008 8:07 AM
To: RPG programming on the AS400 / iSeries
Subject: Figuring out Date Format
Is there an API or a BIF that I can pass in an unknown date format and
get
back a date format I can expect? I am seeing how difficult it might be
to
allow a user to enter in a date how they want. (ex. '01012008'
'01/01/2008'
'20080101') and return *ISO or something else. I could write a
subprocedure,
but I thought I would see if there is something out there that would
either
make the code easier or eliminate my needing it.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.