Alternate Date Format

  • Thread starter Thread starter Chuck W
  • Start date Start date
C

Chuck W

Hello,
I have a field called AdmitMonth that is formated as Date/Time. The values
appear as 4/1/2008, 5/1/2008, 6/1/2008 etc. I want to create a second field
called AdminMonth2 where the values appear as Apr 08 (or Apr-08), May 08, Jun
08 but keep the Date/Time format so that I can still sort chronologically.
Is there a way to do this?

Thanks,
 
All date/time columns are kept internally in the same format, its only when
they are displayed that the format can change. You can change the format to
whatever you want. There is no need to create 2 columns to have the data in 2
different formats, simply create another control on the form based on the
same table column but with a different format property.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Do not add another field. You should not be working directly in a table.
Just use the format as needed in your query, form, or report.
 
Hello,
I have a field called AdmitMonth that is formated as Date/Time. The values
appear as 4/1/2008, 5/1/2008, 6/1/2008 etc. I want to create a second field
called AdminMonth2 where the values appear as Apr 08 (or Apr-08), May 08, Jun
08 but keep the Date/Time format so that I can still sort chronologically.
Is there a way to do this?

Thanks,

The way a date is displayed is set by the control's format property.
This has NO effect on the way the date value is actually stored or
sorted.

Just set the date control's Format property to:

mmm-yy

or (without the -)

mmm yy
 
In a table: No.

In a query, form, or report: yes. It would look something like so:

Format([AdmitMonth],"MMM-YY")
 
Back
Top