Trick the Google Sheets page into applying line breaks in dates by using the \n switch. This links your preferred date format in the page code to a date format you custom create in Google Sheets.
Go to Custom number format and start by adding a custom number format. It doesn’t matter which format, but it’s best to create your own and leave the existing formats as they are.
Do NOT [Apply] yet
Tip: set the format to mirror the format you want (without line breaks) so that it’s memorable.
Now let’s trick Sheets by having the browser override this format with one including line breaks:
Press [F12] to open the built-in developer tools of the browser. Go to the Console tab and paste the following code into the console:
Object.defineProperty($(“[label=’Custom number format’]”), “value”, {value: “DD/MM\nddd”})
Hit [Enter] and close [x] the developer tools panel.
Now you are back in the Custom format dialog, hit [Apply] and the coding set in developer tools will be applied when youvuse this format.
Full article here
You must be logged in to post a comment.