Date Formatting

Highrock

New Member
Joined
Jan 4, 2018
Messages
2
I need a formula that writes the current date exactly as below (Using today's date as an example)


Dinner - Thursday 4th January 2018





ANY HELP GREATLY APPRECIATED I AM GOING MENTAL HERE LADS :rolleyes::LOL::LOL:
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
Office Version
  1. 365
Platform
  1. Windows
Welcome to the Board!

Adding the "th" is the tricky part. You could get it all except for that like this:
Code:
="Dinner - " & TEXT(TODAY(),"dddd d mmmm yyyy")
but adding the "st", "rd", "th" makes the formula much more complex, and might require VBA, depending on the answer to the following question.

Note that if you use a native Excel formula, it will ALWAYS show the current date. So, if you open the file today, it will show today's date. But if you open the file tomorrow, it will show tomorrow's date.
Is that what you want, or do you want the current date to be "frozen in time"? If so, that will require VBA, if you want it done automatically.
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
=TEXT(TODAY(),"dddd ")&DAY(TODAY())&IF(OR(DAY(TODAY())={1,2,3,21,22,23,31}),CHOOSE(1*RIGHT(DAY(TODAY())),"st ","nd ","rd "),"th ")&TEXT(TODAY(),"mmmm yyyy")
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,718
Office Version
  1. 2010
Platform
  1. Windows
Here is another formula (little bit shorter and less function calls) that will also work...

=SUBSTITUTE(TEXT(NOW(),"dddd d| mmmm yyyy"),"|",MID("thstndrdth",MIN(9,2*RIGHT(DAY(NOW()))*(MOD(DAY(NOW())-11,100)>2)+1),2))
 
Last edited:

Highrock

New Member
Joined
Jan 4, 2018
Messages
2
Thanks so much chaps I was losing my f****** marbles over this B******* problem.

Wonderful help!

Cheers!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,384
Messages
5,601,323
Members
414,442
Latest member
Oleg

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top