if(MethodName == "SETDATE")
{
var
LICENSEDATE = Inputs.GetProperty("DATEin");
var
length = LICENSEDATE.length; // Length
Count
if(length
== "9")
{
var datecheck = LICENSEDATE.substring(2, 3);
if(datecheck == "/")
{
var date = LICENSEDATE.substring(0, 2);
var month = LICENSEDATE.substring(3, 4);
var year = LICENSEDATE.substring(5, 9);
var newDate = month +"/"+ date
+"/"+ year;
Outputs.SetProperty("DATEout",
newDate);
}
else
{
var date = LICENSEDATE.substring(0, 1);
var month = LICENSEDATE.substring(2, 4);
var year = LICENSEDATE.substring(5, 9);
var newDate = month +"/"+ date
+"/"+ year;
Outputs.SetProperty("DATEout",
newDate);
}
return
(CancelOperation);
}
else
if( length == "10")
{
date
= LICENSEDATE.substring(0, 2);
month =
LICENSEDATE.substring(3, 5);
year =
LICENSEDATE.substring(6, 10);
newDate = month
+"/"+ date +"/"+ year;
Outputs.SetProperty("DATEout",
newDate);
return
(CancelOperation);
}
else
{
LICENSEDATE
= "";
Outputs.SetProperty("DATEout",
LICENSEDATE);
return
(CancelOperation);
}
}
Comments
Post a Comment