seect records for current day

115 pts.
Tags:
AS/400 Query
I want to run a daily job and select records that have been added on current date, field is 6,0 P in YYMMDD format, how can this be accomplished without modifying daily?

Answer Wiki

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

There is always an easier way but here’s one

In query/400 Define Result Fields
Field Expression
CURDATE year(current(date))*10000 +
month(current(date))*100 +
day(current(date)) – 20000000

That creates a new column containing todays date … today it contains 081219
You can compare your date column with this column. The equations will have
to be adjusted in 91 years.

Phil

Discuss This Question: 3  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
  • rmb
    phil, thanks, i will give it a try. i had a typo on the topic heading (seect records for current day), should be select. i may not be around in 91 yrs. lol ron
    115 pointsBadges:
    report
  • philpl1jb
    All our Y2K fixes will fail in they year 9999!
    51,355 pointsBadges:
    report
  • Cwc
    Y10K...only 7,992 years away.
    4,290 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