Skip to main content

Posts

Showing posts with the label MM/DD/YYYY

How to get today date in MM DD YYYY format in Siebel eScript

Below is eScript which will get the today's date: var CurrentDate, DateStart, MM, DD, YYYY; if (DateStart == "")         {             CurrentDate = new Date;             //above line will get the date in "Tue Aug 10 2021 13:30:45" format.             DD = CurrentDate.getDate();             MM = (CurrentDate.getMonth() + 1);             YYYY = CurrentDate.getFullYear();             DateStart = ToNumber(MM) + "/" + ToNumber(DD) + "/" + ToNumber(YYYY);         }

How to get today date for next year in MM DD YYYY format in Siebel eScript

Below sScript will help to get today's date with next year. Today: 08/10/2021 Result: 08/10/2022 var  CurrentDate, DateEnd, DD, MM, YYYY;  if (DateEnd == "")         {             //Next Year Date                CurrentDate = new Date;                //Tue Aug 10 2021 13:30:45             DD  = CurrentDate.getDate();             MM = (CurrentDate.getMonth() + 1);             YYYY = (CurrentDate.getFullYear() + 1);             DateEnd = ToNumber(MM) + "/" + ToNumber(DD) + "/" + ToNumber(YYYY);             //Outputs.SetProperty("OutTest",DateEnd);         }...

How to get Date difference in Days Siebel eScript

  Date input: MM/DD/YYYY format. Function will return date difference in Days. Inputs: DateStart: 08/10/2021 DateEnd: 08/11/2021 Result: DaysCount : 2   var DaysCount, DateStart, DateEnd; DaysCount = getDateDiff(DateStart, DateEnd);  -- -- -- getDateDiff -- -- -- function getDateDiff(DateStart, DateEnd) {     DateEnd  = new Date(DateEnd);     DateStart  = new Date(DateStart);     var diffDays = (DateEnd - DateStart)/(1000*60*60*24);     diffDays = ToNumber(diffDays)+1;     return(diffDays) }

How to convert date DDMMYYYY to MMDDYYYY through Siebel eScript

Below code will convert DD/MM/YYYY to MM/DD/YYYY date format. if(MethodName == "SETDATE")                 {                                 var LICENSEDATE = Inputs.GetProperty("DATEin");                                 var length = LICENSEDATE.length;  // Length Count                                                          ...