Time calculation

Hi,

I’m super rusty and wonder if someone can help. I need to get an end date from the following:

start_date = 2024-04-02 15:21:30.0
accumulated_time = 05:29:56

I need an end_date in a similar format to start_date

Thank you,
Jeff

Take a look at SuperDate.

Convert your Start_Date to a SuperDate, do the math, then convert it to your desired output with SuperDatePattern.

Time Arithmetic Formulas is your friend.

Try this:

let start_date = "2024-04-02 15:21:30.0"
let accumulated_time = "05:29:56"
let end_date=superdatepattern(superdate(date(array(start_date,1," ")),
    time(array(start_date,2," ")))+time(accumulated_time), "yyyy-MM-dd", " hh:mm:ss")
message end_date

Thanks, Robert. Got to get the old brain back in programming mode : )

Thank you Gary. Much appreciated