I will appreciate if someone can help me understand how to convert string context variables into date/time format and vice versa. Let me describe the use case as follows.
The request.http contains a query parameter "from-date" in the format of yyyy-mm-ddThh:mm:ss-hhmm (e.g. 2017-05-01T00:00:00-0400). I need to first convert it from string to date/time and then to get corresponding UTC date/time. From UTC date/time back to string and perform a query on a back end database which stores UTC date/time as string. In the output I need to covert the date/time from UTC back to local time zone as per the from-date request.
For string to date/time, I tried the following assertion. However, this assertion fails.
Alternative formats available from format: drop down like auto didn't work either.
Please share what assertion to use for string -> date and time.
what assertion to use to convert date and time -> string.
Thank you very much