79202308

Date: 2024-11-19 06:42:53
Score: 1
Natty:
Report link

Append new Date to a string

Since your today variable is already a string because of Utilities.formatDate() (see image below) you can just easily append it to a string(your subject) using the following ways:

Using + symbol

const subject = "New machine "+today

or

Using String literals

const subject = `New Machine ${today}`

Data type of today variable

enter image description here

Sample Output

output

Reference: Utilities.formatDate

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: 4thAnd1