getDate from String ? Should be easy
This should be so simple, yet I'm having issues.
I'm passing a date to a page parameter and then want to pick the value up for some labelling. The URL is passing :
...#Page:Dev_Home_Generic?startDate=01-Jan-2022&endDate=31-Dec-2022
and I'm trying to get the Month and Year but when I try to convert the parameter to a date it either gives me a weird response or an error
- varThisYearText= toDate(input.startDate,"dd-MMM-YYYY");
- ...
- <text type='Text' value='<%=varThisYearText%>' size='15px' color='#000000' marginBottom='5px'> </text>
So how do I convert a string of "01-Jan-2022" to "Jan22" ?