|
-
Jul 10th, 2017, 07:15 AM
#1
JS - formatting a datetime value
I'm trying to format the current datetime into the following format: yyyyMMdd_hhmmss as part of a file download process (the file downloaded will get time stamped with the above value in the name).
in the JS I have this:
new Date().toString("yyyyMMdd_hhmmss");
In the results I'm getting this: Fri_Jul_07_2017_113038_GMT-0400_(Eastern_Daylight_Time)
Woaza! That's way more than I asked for! Bleh. Everything I've looked up uses one library or another. I'm working within the confines of an application, so adding another library isn't a viable option as I don't have the chance to include any thing.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|