× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Did you try VARCHAR_FORMAT for converting a date into a character
representation in the format of YYYYMMDD?

Select ...
Where VarChar_Format(:YourDate, 'YYYYMM') = VarChar_Format(Current_Date,
'YYYYMM')
...

Even Better if you convert the current date before and use a character host
variable.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
dmmueller@xxxxxxx
Sent: Mittwoch, 11. Oktober 2017 14:13
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Date Comparison yyyymm

Roger,

"If they are numeric (which, sadly, the dates in our system are)"

ah... the Y2K project forced us to convert every character or numeric field
to a true date field. Big project, but a good project.
True date fields are great!

I guess I'm showing some age for anyone with those Y2K projects - who
remembers?

Diane Mueller



From: Roger Harman <roger.harman@xxxxxxxxxxx>
To: Midrange Systems Technical Discussion <MIDRANGE-L@xxxxxxxxxxxx>
Date: 10/10/2017 02:06 PM
Subject: Re: Date Comparison yyyymm



If they are numeric (which, sadly, the dates in our system are), I cast
(YYYYMMDD / 100) as an integer and get the numeric equivalent of YYYYMM.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power







From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of
dmmueller@xxxxxxx <dmmueller@xxxxxxx>
Sent: Tuesday, October 10, 2017 6:57 AM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: Date Comparison yyyymm

Group,
I have a date field "payment date" that I need to compare to current date,

but only comparing the year & month.
Any payments received in the current month should be disregarded,

I know this is simple, and I'm over thinking it .

Diane Mueller

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/midrange-l.


MIDRANGE-L mailing list archive (midrange.com) archive.midrange.com
midrange.com MIDRANGE-L mailing list archive


Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


http://g-ec2.images-amazon.com/images/G/01/social/api-share/amazon_logo_5005
00._V323939215_.png


Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs
& more amzn.to Online shopping from the earth's biggest selection of books,
magazines, music, DVDs, videos, electronics, computers, software, apparel &
accessories, shoes, jewelry, tools & hardware, housewares, furniture,
sporting goods, beauty & personal care, broadband & dsl, gourmet food & just
about anything else.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.