On Feb 25, 2023, at 8:19 PM, Amber Marchant <amber.m...@place.com> wrote:
I have the following script which is generating an email based on a trigger in Google Sheets. It's working fine but the date format in the email is not ideal. I would love some help on how to fix this. The date fields appear like this - Deposit Date: Sat Feb 25 2023 07:00:00 GMT+0000 (GMT). But I'd really like it to look like this MM/DD/YYYY.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/a6843b92-9344-4e81-9257-7a4dc28d345en%40googlegroups.com.
Laurie
This code replaces the original msg string with the updated version that includes the formatted date string. Now, the date will appear in the format MM/DD/YYYY in the email message.
I hope this helps! Let me know if you have any further questions.