
Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Thanks, Douglas
I was using a query and came up with:
SELECT [REF-TYPE] & [REF-SERIAL-NBR] AS Jon, Mid$([OPEN-DT],3,2) &
Right$([OPEN-DT],2) & Left$([OPEN-DT],2) AS ConvertOpenDt, P052.[OPEN-DT],
P052.[CLOSE-DT], Mid$([CLOSE-DT],3,2) & Right$([CLOSE-DT],2) &
Left$([CLOSE-DT],2) AS ConvertCloseDt
FROM P052;
But now my problem seems to be that I can't find a way to convert the MMDDYY
to MMDDYYYY. Looks like I will have to learn to write modules.
Many thanks!
Uni
> You can't do it using a Format function, but try:
>
[quoted text clipped - 32 lines]
>>
>> Thanks in advance!
Douglas J. Steele - 24 Sep 2006 20:43 GMT
You really would be better off, I think, using a function rather than doing
it in code, but...
SELECT [REF-TYPE] & [REF-SERIAL-NBR] AS Jon, Mid$([OPEN-DT],3,2) &
Right$([OPEN-DT],2) & IIf(Left$([OPEN-DT],2) < "30", "20" &
Left$([OPEN-DT],2), "19" & Left$([OPEN-DT],2))
AS ConvertOpenDt, P052.[OPEN-DT], P052.[CLOSE-DT], Mid$([CLOSE-DT],3,2) &
Right$([CLOSE-DT],2) &
IIf(Left$([CLOSE-DT],2) < "30", "20" & Left$([CLOSE-DT],2), "19" &
Left$([CLOSE-DT],2)) AS ConvertCloseDt
FROM P052;

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Thanks, Douglas
>
[quoted text clipped - 49 lines]
>>>
>>> Thanks in advance!
Van T. Dinh - 01 Oct 2006 12:45 GMT
If you date values are in the "default" century (set in Windows OS), you can
use the expression:
Format( DateSerial( Left([OPEN-DT], 2),
Mid([OPEN-DT], 3, 2),
Right([OPEN-DT,2) ), "mmddyyyy" )
to convert the date value stored as string in "yymmdd" to a date in the
format "mmddyyyy".

Signature
HTH
Van T. Dinh
MVP (Access)
> Thanks, Douglas
>
[quoted text clipped - 12 lines]
>
> Uni