How do I use the date function

I want to insert a date into a form with the value YYYY - YY. eg 2001 - 02.

How do I format the date function function to give me the above.

I have found that if I use the YYYY - YY function, libreoffice returns 2001 - 01 instead of my above goal.

Please help if you can.

oscar

Is this a Calc question DATE being a standard function in Calc? The DATE function will return a numeric value, not something in a specific format. What is your ‘form’? How did you create it? Is YYYY - YY meant to be a ‘Numbers’ format code? If so you will get “2001 - 01” for every date of the year 2001, of course. Shall the “02” code for February? If so you need the format code YYYY - MM. Did you consider to read the help? A guide?

@Lupp, I feel it may a request to insert a date field on a form, but as you indicate it is unclear. If it is a date field on a form, it probably needs to be two separate fields IMO.

Hello Oscar

I assume you want Year - Month

The format code is:

YYYY - MM