Skip to main content

Posts

Showing posts with the label Date

How show date in Day-Month-Year in Siebel

  There are two ways one is that you change the date format on server level but this will cause issue like if you are getting date in business component and parsing it with some business rule and when you change the date format you need to modify operation everywhere. Below solution is simple and easy to execute. Follow below simple steps to achieve your desired date format. Open Siebel Tools. In Tool go to Applet and query the applet where you want to change the date display format. Now from list or control query the desired date field. Scroll right or use tab to find the "Display Format". Now from below you can make your own date format. For example as per my requirements I am using "DD-MMM-YYYY" after compiling the applet on UI date will display "21-Sep-2022". Format mask Description: YYYY or yyyy four digit year such as 2017 YY or yy last two digits of year such as 17 M month with no leading zero 1-12 MM Two digit month 01-12 MMM Three letter month suc...

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                                                          ...