× 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.



You need a valid date format...

ISO string = '2014-09-05' is what I always use as it always works
regardless of the job settings.

But IIRC you can format the string using the job/runsql date format
settings.

Think there's a couple of numeric value formats that work, but YYYYMMMDD
isn't one of them.

Charles

On Tue, Sep 9, 2014 at 12:13 PM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

Alan,
Unfortunately, iDate is not an option for this customer (need to get
permission to install *any* 3rd party software -including- utilities)
I have tried to use SELECT DATE(field) from my file (where field is
20140905), but SQL did not like that and it returned ++++++++.
Is there an easy way to do this?



Jeff Young
Sr. Programmer Analyst

On Tue, Sep 9, 2014 at 11:46 AM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

On Tue, Sep 9, 2014 at 10:38 AM, Jeff Young <jyoung0950@xxxxxxxxx>
wrote:
Using SQL, how do I convert a numeric value of a database field in ISO
date
format (ccyymmdd) to a DATE data type for comparison?
I need to select all records with a date that is equal to a value input
by
the user.

I think we all agree that the "right" way to do dates is with date
fields. However, if all you need is to check for equality, probably
the fastest thing to do is to convert your input to numeric ISO and do
a direct comparison with that.

And in your case, even if you had to check for earlier-than,
later-than, or between, you could still use the numeric ISO dates
as-is (this would not be the case for MDY, USA, or EUR numeric-field
dates).

That said, it is probably still worth having iDate. :)

John Y.
--
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.


--
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.



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.