When I use Google Sheets, I can format numbers Format -> Number -> More Formats -> Custom number format .... There are specific placeholders described in the help.

What's not mentioned, however, is the following behaviour:

When I set the custom format to d, 18 appears. If I write ed, another number appears. Using quotation marks leads to the correct value.

Why do some letters represent numbers? What's the logic behind it? I had the clue that it could be a date format, but d-m-y does not lead to the correct date.

  • We probably need to see more output to offer any suggestions. What's your source number? What's the format you're using? – ale Aug 7 '18 at 14:31

Actually, you nailed it. those letters do represent date values however date needs to be in the specific overall format:

  • d needs to be in a pair like dd or ddd
  • same goes for m > mm or mmm (single m stands for minutes)
  • and the year is usually yyyy

eg valid format would be "MM/DD/YYYY" or dd.mm.yyyy etc.

check this for more knowledge: https://developers.google.com/sheets/api/guides/formats

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.