Forum Discussion
Joe Cangelosi
May 02, 2018Copper Contributor
Format Date in header and footer
Hi everyone, I like to stamp PDFs of excel docs with the current time and date via the footer (or header). The "insert current date" function inserts the date in my system's default (DD/MM/YYYY)...
- May 02, 2018
Hi Joe,
It seems that there is no option to change the format through the Current Date and Current Time elements.
They always give you the date and time based on the default date format of the OS.
The format will not change unless you changed the default date format of the OS.
Regards
Joe Cangelosi
May 02, 2018Copper Contributor
Thank you!
Willy Lau
Nov 08, 2018Iron Contributor
Only VBA could help.
- SPrcevichNov 04, 2021Copper ContributorSub add_date_header()ActiveSheet.PageSetup.CenterHeader = Format(Date, "mmmm dd, yyyy")End Sub
- AnhtonDec 31, 2021Copper ContributorThanks Buddy, it's really helpful.
- HansMoviatJul 20, 2022Copper Contributor
I used the following to also change the font and size::
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Worksheet.PageSetup.LeftFooter = "&""Arial Black,Standaard""&12Updated: " & Format(Now(), "d mmmm yyyy hh:nn")
End Sub