Announcement

Collapse
No announcement yet.

Date/time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date/time

    Hello,

    How do I get the date/time in the following format in variable?

    yyyyMMdd hh:mm:ss

    -Manesh

  • #2
    Hey Manesh, I'm no guru with EFS but you could do something similar to this:

    var today = new Date();

    var year = today.getYear();
    var month = today.getMonth();
    var day = today.getDate();
    var hour = today.getHours();
    var mins = today.getMinutes();
    var secs = today.getSeconds();

    var dayVal = year + month + day +" " + hour + ":" + mins + ":" + secs

    This probably isn't exactly the formatting you want, but its 90% of the way there.

    Check out the knowledgebase on Date Object for more info.

    Cheers,

    Scott

    Comment

    Working...
    X