I want to translate all google sheets date pattern tokens using Sheets API in JAVA. I am having difficulty in the token "mmmmm" which google marks as
First letter of the month (e.g., "J" for June).
The issue with doing it manually is that some letters may stand for 2 months, like A for {April, August}. Is there any way for me to translate this to any of JAVA's datetime?
PS: I am new to this API, so if there is any other way in which i can handle all these dates which I am missing, that may also be helpful.
I also faced this issue in the past. I found a far better way of dealing with google sheet dates, by using the SERIAL_NUMBER that its API returns. https://developers.google.com/sheets/api/reference/rest/v4/DateTimeRenderOption
This corresponds to the number of days since 30th December 1899. For example if this SERIAL_NUMBER is 5.25, it means 5 days and 6 hours past 30th December 1899. Offsetting this value to EPOC time and using the timestamp from there is the best way to handle google sheets dates.