This looks very time  consuming and difficult job to find the exact function. if you  know that can you please give me the syntax of this.

Set date = "20240501144800-0500"

convert this date into below format.

expected result -> 2024-05-01T16:49:00-05:00