yes1819
2 years agoNew Contributor III
S3 file upload with TODAY'S date in the file name
Hi,
I'm trying to add today's date in the file name when I load CSV file on S3 bucket.
I know there is Date.now() , but this gives date with local tiem.
What's the best way to add local DATE only (today's local date) (NOT THE TIME)?
Thank you
Thank you so much Miller.
Your code was working ok, but it saved file with some weird date.
In the screenshot, the first file is with your code, and saved as 2023-04-12 instead of 2023-12-12
Below 2 files are saved with Date.now() and their date is ok.
Do you think you can figure out why it saved the file as 2023-04-12?
The last screenshot is the new snap that I used your code.
Thank you so much!
Date.now().toLocaleDateString({"format":"yyyy-mm-dd"})