Adapt Excel Date Code For Access

I use the following code in Excel to format today's date like this .......
11th April     3rd April     1st March    14th May       31st July

EXCEL CELL Contains this (No VBA Used)
=TEXT(TODAY(),"d") & IF(OR(MOD(TEXT(TODAY(),"d"),100)={11,12,13}),"th",CHOOSE(1+MIN(4,MOD(TEXT(TODAY(),"d"),10)),"th","st","nd","rd","th")) & " " & TEXT(TODAY(),"mmmm")

Open in new window

Can it be adapted to work in Access 2013 ?
LVL 24
EirmanChief Operations ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Perhaps.
OrdinalDate:Format([DateField], "d") & Switch(Day([DateField]) <> 11 And Day([DateField]) Mod 10 = 1, "st", Day([DateField]) <> 12 And Day([DateField]) Mod 10 = 2, "nd", Day([DateField]) <> 13 And Day([DateField]) Mod 10 = 3, "rd", True, "th") & " " & Format([DateField], "mmmm")

Open in new window

0
EirmanChief Operations ManagerAuthor Commented:
@Norrie - I need the code in a text box
At the moment I have =Date()    Format = dddd - dd mmmm yyyy

It your code a VBA function?
0
NorieAnalyst Assistant Commented:
Try this.
=Format(Date(), "d") & Switch(Day(Date()) <> 11 And Day(Date()) Mod 10 = 1, "st", Day(Date()) <> 12 And Day(Date()) Mod 10 = 2, "nd", Day(Date()) <> 13 And Day(Date()) Mod 10 = 3, "rd", True, "th") & " " & Format(Date(), "mmmm")

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EirmanChief Operations ManagerAuthor Commented:
That appears to be working fine Norie
I'll check it with a few different dates before closing the question.
0
EirmanChief Operations ManagerAuthor Commented:
I changed the computer clock a few times and everything is okay.
Thank You.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.