FormatDate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In access when creating a query I want to format the date of the output to
dddd, d MMMM yyyy (e.g Wednesday, 15 Novemeber 2006). I found the function
formatdate() but I am unsure on how to use it. Theory would be to do
FormatDate(String, 'dddd, d MMMM yyyy'). It is something so easy that I
cannot spot it! Thanks
 
You can format the date in the query by right-clicking the field, and
choosing Properties. Then type the expression you want (just the bit inside
your quotes) beside the Format property.

In general, you will use the query as the source for a form or report. If
you prefer, you can type the expression into the Format property of the text
box.

If you are planning to export the query data, you can type the whole Format
expression into the Field row of the query, i.e.:
Format([MyField], "dddd\, d MMMM yyyy")
This will cause it to export correctly. However, it converts the date into a
string, so you cannot sort the query or apply criteria on this expression
and expect sensible results.
 
Back
Top