If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Format Date
I have the following code in a Text Bax in a Report:
=Trim("Born on" & " " & [Date of birth] & " " & ("in" & " " & [Place of Birth] & " " & Trim("and baptised this day" & " " & [Date of Baptism]))) What I would like, is to add the format command to convert the dates to dddd mmm yyyy Could anyone tell me the corrrect syntax and where this should be placed? Many thanks for any assistance. |
#2
|
|||
|
|||
Format Date
You need the format function.
=Trim("Born on " & Format([Date of birth],"d mmm yyyy") & " in " & [Place of Birth] & " " & Trim("and baptised this day " & Format([Date of Baptism],"d mmm yyyy")))) I'm not sure from your posting what format you actually want. "dddd d mmm yyyy" will give you Saturday 6 Feb 2010 "d mmmm yyyy" 6 February 2010 Look up the format function in VBA help for further information on formatting dates with the format command. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Roger Bell wrote: I have the following code in a Text Bax in a Report: =Trim("Born on" & " " & [Date of birth] & " " & ("in" & " " & [Place of Birth] & " " & Trim("and baptised this day" & " " & [Date of Baptism]))) What I would like, is to add the format command to convert the dates to dddd mmm yyyy Could anyone tell me the corrrect syntax and where this should be placed? Many thanks for any assistance. |
Thread Tools | |
Display Modes | |
|
|