Format Date on Report (text box) (1 Viewer)

anoo

Registered User.
Local time
Today, 11:16
Joined
Feb 10, 2017
Messages
17
Dear Experts:

I use a text box with control field

="Date Range: " & [Forms]![Form1]![txtBeginReportDate] & " to " & [Forms]![Form1]![txtEndReportDate]

to display date on a report.

Is there an easy way to format the date range on report to "Medium Date"? (15-Feb-17)

- test file is attached.

Thank you so much for your help.
 

Attachments

  • test.accdb
    1 MB · Views: 178

Gasman

Enthusiastic Amateur
Local time
Today, 19:16
Joined
Sep 21, 2011
Messages
14,237
Format(yourdate,"Medium Date")
 

anoo

Registered User.
Local time
Today, 11:16
Joined
Feb 10, 2017
Messages
17
Solved. Thank you very much.
 

4disk

New member
Local time
Tomorrow, 01:16
Joined
Feb 8, 2019
Messages
2
I can't use it formula: Format([Field Name], "dd MMMM yyyy"
 

isladogs

MVP / VIP
Local time
Today, 19:16
Joined
Jan 14, 2017
Messages
18,209
Welcome to AWF.
You are missing an end bracket e.g.

Code:
?Format(Date, "dd mmmm yyyy")
08 February 2019
 

4disk

New member
Local time
Tomorrow, 01:16
Joined
Feb 8, 2019
Messages
2
thank you for your respon,
I still get error message/ invalid syntax, is it means like:
="text ........" & Format([field name], "dd MMMM yyyy")
or
="text ........" & [field name] Format(date, "dd MMMM yyyy")
 

isladogs

MVP / VIP
Local time
Today, 19:16
Joined
Jan 14, 2017
Messages
18,209
The 2nd version is wrong.
The first version should work providing you are using a real date field name instead of [field name]. It should also be mmmm but it will work with MMMM

So if your date field is called EventDate then you need
Code:
Format([EventDate], "dd mmmm yyyy")

If it still fails after that, try typing ?Format(Date, "dd mmmm yyyy") in the VBE immediate window and check it gives todays date
 

Users who are viewing this thread

Top Bottom