Date format in Calc Header/Footer

I cannot change the date format in headers or footers away from the fixed 00/00/0000 format. This is not new - Calc has been this way through many iterations. Is there a way round it, or is there any prospect of a change to remove this admittedly minor irritant?

The date format depends on the locale settings.

My UI is English, but the Locale setting is Hungarian:
The hungarian date format is YYYY.MM.DD
The Date will appear in the footer in this format.

1 Like

A 20 year old macro: Download HeaderFooter_2004-07-04.zip (OpenOffice.org Macros)

Thanks to Villeroy, but the macro is all in German and I can’t make sense of it!

Thanks to Zizi64, but that doesn’t do what I want. I should have been clearer in my original post about what I want, which is to choose a format such as NN D MMM YY eg Fri 2 May 23, which is available for other fields throughout Libre Office. Seems odd that it can’t be available in Calc headers/footers.

tdf#89187.

So this has been around for a long time! And still no solution

  • Do you know somebody willing to create a “sollution” and being cabable of doing so? If so: Ask him (f/m).
  • (IMO) The concept of headers and footers of spreadsheet pages is outdated anyway, and the results are ugly and don’t even well adapt to the available widths. No visual control during editing.
  • A completely new specification and implementation would be preferable, but would (supposedly) break existing user code and downward compatibility.
  • Broken compatibility with software by a known competitor (I just forgot the name.) would not be accepted by users even if the new implementation is clearly better.
  • Quick and dirty solutions of 4 decades ago can act as “original sins”.
  • Concerning date formats the actual problems are anyway that the one and only roughly reliable format (ISO 8601 extended) isn’t accepted by stubborn users, and that there always are two co-existing dates at a time around the world.

Thankyou, Lupp.
“the concept . . is outdated” and *“the results are ugly” are matters of opinion, ones I don’t happen to share - except that I agree the existing format is indeed ugly.
But I’m sure the technical objections you outline are valid, so I guess it isn’t important enough to pursue.

Similar topic from the AOO/LO Forum:
https://forum.openoffice.org/en/forum/viewtopic.php?t=98486

Did I really write that code? Anyway, I don’t remember writing that code 5 years ago because I never got any feedback.

Did you try creating a custom style for header/footer?

Go to the menu: Format > Page Style.
In the Page Style dialog, go to the Header or Footer tab.

@flowen
There is nothing in those tabs that would allow setting a date format.

1 Like

from the format menu, click page style
you’ll have the tabs
organizer, page, …,header,footer,sheet

on the header tab for example there should be two buttons; more and edit, click edit
then you’ll have the header page style with 3 sections:
left area, center area, right area
you’ll also have some buttons for custom header;
text arttributes, title,…,date,time

hopefully this helps you. If you still need more assistance with setting it up, let me know where you get stuck.

You can write the date in a cell, format the cell in the style you want, then copy that and paste the formatted date in the settings.

Valid as a workaround to apply formatting, but once you paste it, it will be no more a date but text.

And of course it won’t change when the actual date does, so one would need to remember to update it each time the spreadsheet was used/printed.

This is the situation; and as was pointed out above by erAck, an enhancement request is open.

The macro can be triggered by various document events. If you store the setup in a template, event “document created” updates the date/time for each new document, analog to Writer’s fixed time fields.
You may also use the “document saved” or “document saved as” or the “print document” event.