Details
In my Google Sheet I have a column that has been formatted in the 03:59 PM
format. When I insert time into it, the data is correctly formatted as 00:00 AM
automatically, but not with the correct date, as it says it's from the year 1899.
When I insert data and specify the date first, it overwrites the columns 00:00 AM
format and instead inserts a MMM DD YYYY 00:00
format with the month being text, day and year in numbers, and no AM or PM. When I manually format the cell (or whole column) again with 03:59 PM
format, it shows the right time format and has the correct date.
I'm currently adding data via a Python script with the Gspread module. This allows me to format it with a specified pattern. The data is added to a cell as a date time string, which then changes the cell's formatting, but then immediately after that individual cell is overridden again into a hh:mm AM/PM
pattern format: {"numberFormat": {"type": "DATE_TIME", "pattern": "hh:mm AM/PM"}}
.
Therefore right now only when manually typing in data, it isn't overridden immediately after like the Python script.
Question
How can I insert data into a sheet that has a date time property (or at least contain both the date and time), while not overwriting the column's 00:00 AM
formatting?
Have tried:
- Formatting the entire column and then entering data
- Entering data with various formats, like
12/12/2021 3:00 PM
which adds the PM but still overwrites just the time format.