Format Date Question

L

luis.a.roman

Need to have an access formua to retrieve the system date and format
the date as 1/12/2007. I use the expression below but it does not
worked.

Expr1: FormatDateTime(Date(),"yymmdd")

Can someone help me develop the correct formula?

Thank you - Luis
 
R

Rick Brandt

Need to have an access formua to retrieve the system date and format
the date as 1/12/2007. I use the expression below but it does not
worked.

Expr1: FormatDateTime(Date(),"yymmdd")

Can someone help me develop the correct formula?

Why would you expect a format string of yymmdd to produce an output like
1/12/2007?

Expr1: FormatDateTime(Date(),"m\/dd\/yyyy")
 
J

Joseph Meehan

Need to have an access formua to retrieve the system date and format
the date as 1/12/2007. I use the expression below but it does not
worked.

Expr1: FormatDateTime(Date(),"yymmdd")

Can someone help me develop the correct formula?

Thank you - Luis

Right from the help file:

Custom Formats
You can create custom date and time formats by using the following symbols.
SymbolDescription
: (colon)Time separator. Separators are set in the Regional Settings
Properties dialog box in Windows Control Panel.
/Date separator.
cSame as the General Date predefined format.
dDay of the month in one or two numeric digits, as needed (1 to 31).
ddDay of the month in two numeric digits (01 to 31).
dddFirst three letters of the weekday (Sun to Sat).
ddddFull name of the weekday (Sunday to Saturday).
dddddSame as the Short Date predefined format.
ddddddSame as the Long Date predefined format.
wDay of the week (1 to 7).
wwWeek of the year (1 to 53).
mMonth of the year in one or two numeric digits, as needed (1 to 12).
mmMonth of the year in two numeric digits (01 to 12).
mmmFirst three letters of the month (Jan to Dec).
mmmmFull name of the month (January to December).
qDate displayed as the quarter of the year (1 to 4).
yNumber of the day of the year (1 to 366).
yyLast two digits of the year (01 to 99).
yyyyFull year (0100 to 9999).
hHour in one or two digits, as needed (0 to 23).
hhHour in two digits (00 to 23).
nMinute in one or two digits, as needed (0 to 59).
nnMinute in two digits (00 to 59).
sSecond in one or two digits, as needed (0 to 59).
ssSecond in two digits (00 to 59).
tttttSame as the Long Time predefined format.
AM/PMTwelve-hour clock with the uppercase letters "AM" or "PM", as
appropriate.
am/pmTwelve-hour clock with the lowercase letters "am" or "pm", as
appropriate.
A/PTwelve-hour clock with the uppercase letter "A" or "P", as appropriate.
a/pTwelve-hour clock with the lowercase letter "a" or "p", as appropriate.
AMPMTwelve-hour clock with the appropriate morning/afternoon designator as
defined in the Regional Settings Properties dialog box in Windows Control
Panel.


You will find a properly formatted version if you just search for
"format date" in the help file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top