×
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.
Hi Bill
Look up iDate - google is your friend
I installed it on our system a couple of years ago - because I was having problems with converting a field supposedly representing a date, but contained a glut of non date values
IDate was a god send
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bill Howie
Sent: Tuesday, June 28, 2016 4:51 PM
To: midrange-l@xxxxxxxxxxxx
Subject: An easy (I think) SQL question
Hello all,
I have what I think is a fairly simple SQL question but it's baffling me.
I have a field in a file that is a date (field is in packed format). The date in the field looks like this: 1160628. The need is to only grab records from this file that go back 3 months from the first day of the current month, so in this case I'd only want records with a date greater than 1160301. This also needs to work if when subtracting the 3 months I had to go across multiple years. I know I can do a formula something like
this:
(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 3 MONTH)
But I'm not sure how to use the packed numeric date field I have to get
there. Any thoughts would be greatly appreciated. Thanks!
Bill
--
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:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.