Hi everyone,
I’m currently working on an IDM script to display a date in a specific format. The script works fine as long as the format doesn’t include special characters.
Issue: As soon as I try to use a format that includes characters like "/" or "-", the script throws an error and fails to display the date. I'm also working in demo mode, so I'm not sure if that's affecting it.
Has anyone encountered this issue before?
Is there a solution or an alternative to properly display a date format with special characters?
Thanks in advance for any help!
String $formadate= xpath(/M3OutReport/DataArea/Report/Formatting/Localization/DateFormat);
String $date=xpath(/M3OutReport/DataArea/Report/Header/ZZDATE);
String $day = substring($date,8,10);
String $month = substring($date,5,7);
String $year = substring($date,2,4);
String $fullyear = substring($date,0,4);
String $rep1 = replace($formadate,'MM',$month);
String $rep2 = replace($rep1,'DD',$day);
String $rep3 = replace($rep2,'YYYY',$fullyear );
$Fdate = $rep3;