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



Tony Carolla wrote:
> 
> Doesn't %Int() convert the date with a two-digit year? I just like the fact
> that the date math narrows it down to just one date -- no matter what
> century, no matter what date. Maybe it's just the Y2K flashbacks, but me no
> likey two-digit years.
> 

By default %DEC converts the date to whatever format the date expression
has.  If you have a 4-byte integer array to store the date, and your
dates are already *ISO, you could do the following, and it would get the
full 8 digit version.
   intDate(i) = %DEC(yourIsoDate)
or explicitly storing as *ISO:
   intDate(i) = %DEC(yourDate : *ISO)

%INT doesn't convert dates directly.  You would have to use %CHAR to get
a character value for %INT to convert, but %CHAR behaves the same way,
defaulting to the date expression's format.
   intDate(i) = %INT(%CHAR(yourIsoDate))
or
   intDate(i) = %INT(%CHAR(yourDate : *ISO))

Two-digit-year dates?  Brrr, I agree, they are bad, bad, bad, for
everything except possibly interaction with a user.  I know some users
insist on 2-digit years, but me, I'm much happier with a 4-digit year,
and happiest when the year is first, so I know for sure what each part
of the date means.  I'd rather the application tell me what I'm entering
or seeing, than have to guess what it thinks I want to enter/see.


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.