Date Function AS400

130 pts.
Tags:
AS/400 DB2
iSeries development
I need the Date function of DB2. Actually I want to subtract the Date however I have used the follwoing: select current date -1 from sysibm.sysdummay1; But It occures an error. Is there any way to subtract the date in the query. I am using iSeries DB2 AS400

Answer Wiki

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

Dear Mr. SEA,

You must subtract a duration of 1 DAY to the date, then your expression must look like this:

Select CurDate() – 1 Days from SysIBM.SysDummy1

The error ocurred because SQL took that one alone as numeric instead of a date type.

Best regards,

Gerardo.

Thanks Gerardo,

I had found from of another site the solution that was different but subtraction was successfull. I have checked your given query this also working.

May I have your email address please:

Thank you v.much.

Discuss This Question: 2  Replies

 
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
  • NewGirl56
    Mr SEA, Could you please tell what that other site was? NewGirl56
    35 pointsBadges:
    report
  • GAC
    Hi Mr. SEA, Here is my email address: Gerardo.Aguero@gmail.com Regards, Gerardo
    300 pointsBadges:
    report

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