Decimal Value as a Date

5 pts.
Tags:
AS/400 development
Data
I have an AS/400 field called ADMIT_DATE that is typed DECIMAL(8,0). It contains values such as 20061031. (including the decimal point). I would like to convert that field to an AS/400 DATE field such that the resulting values look like 2006-10-31. Can someone provide an example using the AS/400 type conversion functions? Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you are using RPG, try the %Date() BIF.

If you are using SQL, use the Cast or Date functions.

Gerardo

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following