ParseDateTime advice needed!

0
Hi, i am trying to use this function but i cannot get it to work, could anyone give me some advice on how to get it to work please!!: if $IteratorStgScheduleActivities/BaselineProjectStart = empty then empty else if find($IteratorStgScheduleActivities/BaselineProjectStart, '*') = -1 then parseDateTime(toUpperCase(replaceAll($IteratorStgScheduleActivities/BaselineProjectStart, '-' , '/')), 'dd/MM/yyyy') else parseDateTime(toUpperCase(replaceAll(substring($IteratorStgScheduleActivities/BaselineProjectStart, 0 , find($IteratorStgScheduleActivities/BaselineProjectStart , '*')), '-', '/')),'dd/MM/yyyy')   below is a selection of values that can be passed in: - empty - 01/Apr/20 - 01/Apr/20* - 1/Apr/20   i dont have much knowledge on the ‘dd-MM-yyyy’ format and how to set it up so any advice on that also would be greatly appreciated
asked
2 answers
2

Why are you working with replaceAll? You could just use parseDateTime($YourDateTime, ‘dd-MM-yyyy’)

empty walues need to be filtered out before calling any of these actions

 

Did you already check out the documentation? https://docs.mendix.com/refguide/parse-and-format-date-function-calls

answered
0

i Found the answer to this, all i needed to do was change the end sections to ‘dd,MMMM,yy’

answered