Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9766

    Stefan
    Participant

    I like to suggest new macro properties

    Date.Day
    Date.Month
    Date.Year
    Date.Hour
    Date.Min
    Date.Sec

    On an example date of “24.7.2011 14:15:16”
    i like to get:

    Date.Day = “24”
    Date.Month = “7”
    Date.Year = “11”
    Date.Hour = “14”
    Date.Min = “15”
    Date.Sec = “16”

    – – –

    Currently it seams it is not that easy just for average users:


    strDate = fCurrDateTime();
    alert(strDate);


    function fCurrDateTime()
    {
    var currentDate = new Date();
    var day = currentDate.getDate();
    if (day < 10) day = "0" + day;
    var month = currentDate.getMonth();
    if (month < 10) month = "0" + month;
    var year = currentDate.getFullYear();
    vDate = year + "," + month + "," + day;

    var currentTime = new Date();
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();
    if (minutes < 10) minutes = "0" + minutes;
    vTime = hours + "," + minutes;
    return vDate + "-" + vTime;
    }
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone