Assuming that the field in question is a text field AND that it contains
nothing but things that CDate can read as valid dates AND always has 8
characters in the order you described (no nulls allowed) the following should
work in a query:
TheDate:Format(CDate(left("[DateField]",4) & "-" & mid("[DateField]", 5,2) &
"-" & right("[DateField]", 2)),"DD-MMM-YYYY")
If you must have OCT instead of Oct, wrap it up in the UCase() function.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
Dave said:
I have a date as 20081003 that I want to change to 03-OCT-2008. I have been
able to move the charters around to 03-10-2008, but I have not been able to
figure out how to change the 10 to OCT.
Can you help?
Thanks