3

I'm using a script that was posted here on Web Applications: Is there a way to insert today’s date into a Google Docs?. I changed the way the date is formatted to: ddMMMyyyy but want 01JAN2015 - the month being capitalized.

Currently my script reads and outputs like 01jan2015.

How do I capitalize the date?

1
  • Where in my code would I insert the command .toUpperCase?
    – Chris
    Jan 29, 2015 at 17:36

1 Answer 1

2

Change this

var date = Utilities.formatDate(new Date(), "GMT", "ddMMMyyyy");

into this

var date = Utilities.formatDate(new Date(), "GMT", "ddMMMyyyy").toUpperCase();

ht to Chris

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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