Date reformatting

B

Bunky

I have a file that has a date in YMMDD format. I wish to change it around
and then query on just the data in a MM/DD/YYYY format. I have been working
with Format and DateSerial but I cannot seem to get all my ducks in a row.
Any assistance would be greatly appreciated!!!!
 
D

Dorian

By 'file' do you mean table?
How is the column defined 'text' or 'datetime'?

Your answers to these questions will guide an answer.
It's recommended to have all date information in datetime columns so you can
use date functions to query the data in various ways.

-Dorian
 
B

Bunky

Dorian,

Thank you for the reply. Yes, I am old school and I meant Table. It is
defined as text. However, I have found my answer on my own and I am very
sorry to have bothered you.

Thanks again!
 
D

Douglas J. Steele

Do you literally mean Y (as in a single digit), or is it actually a proper
year?

If it's a single digit, how do you know whether 8 is 1998 or 2008?
 
B

Bunky

Hi Doug!

I'm sorry I did not answer earlier but I did not see the notify for some
reason.
Yes, I really mean a single digit for the year. Stupid as it may sound, all
of our reservation dates are stored in the AS-400 YMMDD. And I have asked
the same question of IT so often they don't even want to see my emails to
them! And now, of course, we really need to enlarge the field which will
mean to enlarge the file (no extra space left). However, they just laid off
1/2 of our IT staff so it is not going to happen in the near future.

Kent
 
D

Douglas J. Steele

So how will you know whether 9 is 1999 or 2009? Without knowing that, I
really can't offer any suggestions.

By the way, the reason you never received any notification is because you
only get notified if the user used Microsoft's web interface to respond.
While it's not immediately obvious, you actually posted your question to an
NNTP newsgroup (microsoft.public.access to be precise). Many of us prefer to
use newsgroup readers rather than web interfaces
 
Top