Hi Guys,
I have some code which takes the current date and splits it into dd, mm and yy variables.
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
this.rawValue = "Text, " + dd+ "-" + mm + "-" + yyyy;
I need to pass this a date from a date field instead of taking to days date but I cannot get it working.
var today = this.parent..DateTimeField2.rawValue;
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
this.rawValue = "TEXT, " + dd+ "-" + mm + "-" + yyyy;
Any help would be appreciated.
Thanks!