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



Thanks Birgitta! This is good to know once we upgrade to v7r3.

Per your other post, thankfully, all of our dates here use 4-digit years.

- Dan

On Sat, May 5, 2018 at 4:44 AM, Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>
wrote:

SQL can handle character dates in the ISO, USA or EUR format very well, but
not very well with numeric dates.
But there was an enhancement in Release 7.2 in the scalar functions such as
DEC, INTEGER, so a Date, Time or Timestamp can be directly converted into a
numeric date, time, timestamp in the format YYYYMMDD, HHMMSS,
YYYYMMDDHHMMSS)
In this way you only need to convert your character date into a real date
and convert the result into a numeric value:

The following SQL code works on my 7.3 machine:

Dec(Date(CharDate), 8, 0)

Using VarChar_Format might be a little more complicated:
Dec(VarChar_Format(CharDate, 'YYYYMMDD'), 8, 0)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.