I want to format a date with a format that isn't available in the Date Time field formatting list (YYDDMM)
I can do this with a field calculation, but as I want to use this in multiple places, would prefer to use a Rule instead where I can simply pass in my date and get the formatted value back.
It appears that the Formula won't allow me to pass in the date directly from the Date picker field. Therefore I am adding the selected date to a single line field called Date_Value. I am passing the Date_Value into the Rules formula as a parameter. When viewing the Data_Value field in the form, the date is displayed as a 5 digit number e.g. 45300.
If for example I try using YEAR(%(Date_Value)) in the formular, I get the error "The function "YEAR" produced the error "The format of the "45300" cannot be understood. Try changing the date."
I have tried setting the type for the Input Parameter to text, integer and and DateTime, none of these make a difference.
I guess I need to convert the 5 digit date number before using it in the YEAR() function, but I can't find a function that converts it. Can someone point me in the right direction please? I don't know if I need to be passing in the value differently from the form, or if I can convert in the rule.