Ask Your Question
0

How do you apply a D MMM YYYY format to a Date field?

asked 2020-03-29 08:57:22 +0200

hfinger gravatar image

updated 2020-03-29 08:58:20 +0200

I have a Calc spreadsheet with date and time fields in the footer to keep track of versions as data is altered or added. When I apply this Number format to a date that has been typed in, it is displayed correctly, e.g. 9 Mar 2020. But if I insert a date field, it is always displayed as 09/03/2020,even when the cell is set to Date type with the D MMM YYYY format (spaces in format template intentional). How can I apply the D MMM YYYY number format automatically to the Date field as its value changes with each revision?

edit retag flag offensive close merge delete

Comments

This is about the Headers / Footers defined for PageStyles used when printing ranges of spreadsheets: "How to apply formatting (for dates e.g.) to Header / Footer in Calc?" might be a "speaking" subject for other users trying to find an answer to the (roughly) same question.
The terms Header / Footer should be mentioned in the subject. The specific format you want doesn't give relevant information.
BTW: That format isn't agood one anyway. Always regard ISO 8601 whent formatting dates:
YYYY-MM-DD.
There surely is not a single person getting prints from you who wouldn't clearly understand that.

Lupp gravatar imageLupp ( 2020-03-29 14:42:16 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-03-29 14:33:44 +0200

Lupp gravatar image

updated 2020-03-29 17:40:37 +0200

You cannot.

The format used for date fields in Headers/Footers of PageStyles in Calc always is taken from a default of which I don't exactly know in what ay it is hard-coded.

What I tried:
With user code (in Basic e.g.) you can actually get a TextFiled of 'DateTime' type in the header or footer, and you don't get an error message if you try to assign a different value to its .NumberFormat property, but the attempt simply is ignored.

Personally I abandoned the usage of Header / Footer in Calc completely. Where needing a similar functionality I use dedicated cells, an probably a fixed row for the PrintRange(s).

You may report a bug (enhancement requests are treatd the same way) to
https://bugs.documentfoundation.org

<edit td=2020-03-29 15:40UTC>

See also tdf#89187

</edit>
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-03-29 08:57:22 +0200

Seen: 49 times

Last updated: Mar 29