Format Today() in a string

YesConsulting

New Member
Joined
Jan 7, 2019
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
To show todays date the formula =Today() in a cell returns just that... A formatted date : 1/13/19

I have a cell to show the week number and todays date

<style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @Page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in; mso-page-orientation:landscape;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding:0px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} --> </style>[TABLE="width: 87"]
<colgroup><col width="87" style="width:65pt"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 87"]="Week: " & ISOWEEKNUM(TODAY() + 1) & " " & TODAY()[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]

This returns :
[TABLE="width: 174"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD="colspan: 2"]Week: 3 43478[/TD]
[/TR]
[TR]
[TD]
I expected it to return : Week 3 1/13/19
It would be even better to return : Week 3 Jan 13, 2019 but that may be too much?!

Besides not making sense (to me) why the function does not function the same...
I cant find any formatting function that works at the cell level.
The Format() only works in VB.

This seems like a dummy question, like it should be obvious..
But having spent quite a bit of time on it has me perplexed.
I am prepared to be embarrassed.

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]

[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You need to use the TEXT function in order to force Excel to display the date with the format

="Week: " & ISOWEEKNUM(TODAY() + 1) & " " & TEXT(TODAY(),"mmmm d, yyyy")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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
Back
Top