I have tried to be able to have all my dates display with two digit month/ two digit day/ two digit year. I tried the input mask and that doesn't seem to do what I want. Is there a way to get all dates to display like that?
Since the o.p. only wanted to display the date the format function isn't needed at all
I have tried to be able to have all my dates display with two digit month/ two digit day/ two digit year. I tried the input mask and that doesn't seem to do what I want. Is there a way to get all dates to display like that?
WIS, That actually worked wonderfully for me in the situation I'm trying to resolve. However....I'm using a somewhat odd date format, mmm/dd/yyyy, and for consistency's sake, I'm trying to get the month in all caps.
(I'm working with an old table that has a date field that was never configured as an actual date field due to the somewhat odd format required of the date)
So, I'm trying to force this:
Apr/14/2009
to be this:
APR/14/2009
But still allow the field format to be a date. I tried using a > in the Format but that made it no longer a date field. Anybody have any ideas?
Thanks
APR/14/2009 is not a valid date format, so as hard as you try to make it one, it won't be.
Well...In Access 2007 anyways, I went into Table Design, selected Date/Time as Field type, then manually keyed in mmm/dd/yyyy for the field format, and did the same in the control on the form I needed it in. This is unique to this particular table and form within the database, the table/form are mutually exclusive and the data is used only for a couple reports that require this date format. It seems to still regard it as a date, and will convert dates entered in other formats to the mmm/dd/yyyy format I specified...so in that respect, at least, it seems to work fine, although I haven't tried linking the table to any other forms or tables, so I'm unsure if it would play well with others that way.
APR/14/2009 is not a date but "APR/14/2009" is
MsgBox CDate("APR/14/2009") [color=green]' 14/4/2009 in Day/Month/Year format[/color]
MsgBox IsDate("APR/14/2009") [color=green]' True[/color]
MsgBox CDbl(CDate("APR/14/2009")) [color=green]' 39917[/color]
Why format a date in a table? Tables are for storing data not formats.
Format the date data as where and when needed.
Your users should not be viewing table data anyway.