|
Here's a method I use:
Define 3 result fields in the query -
1. YY (2,0) = YYMMDD / 10000
2. MMDD (4,0) = YYMMDD - (YY * 10000)
3. MMDDYY (6,0) = MMDD * 100 + YY
It definitely ain't pretty, but it works. Just make sure you define the
fields with no decimals (i.e. 2,0 4,0 and 6,0).
Hope that helps.
Bob Ladutko
BIC Corp.
> -----Original Message-----
> From: Carl Galgano [SMTP:cgalgano@ediconsulting.com]
> Sent: Tuesday, February 09, 1999 6:44 AM
> To: Midrange List
> Subject: Date conversion technique in QUERY
>
> anyone have a quick and dirty way to convert a date (6,0) in a YYMMDD
> format
> to a MMDDYY format for printing in a Query? I know I can multiply by
> 100.0001, however Query thinks it knows better and won't let you chop off
> the left most 2 significant digits, which makes this technique not work.
> (I
> get the dreaded +++++++++ as the output for this field).
> Surely someone has solved this little problem.
> TIA,
> Carl
> Carl Galgano
> EDI Consulting Services, Inc.
> 540 Powder Springs Street
> Suite C19
> Marietta, GA 30064
> 770-422-2995
> mailto: cgalgano@ediconsulting.com
> http://www.ediconsulting.com
> EDI, Communications and AS400 Technical Consulting
> << File: Carl J. Galgano.vcf >>
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.