Return time portion from datetime
talebi
Forums
Hi everyone,
I am wondering if there is a way to return the time portion from a datetime character value?
I tried @Ctot function but it returns "00:00:00".
I mean it should pull "01:28:31" from "12-Apr-2021 01:28:31". I am looking for a function not macros scripts.
Thanks,
The problem is that you need
The problem is that you need to first isolate the time portion or the string, using the @Ctot will give you that result because it doesn't know where in the string the time portion is. You can use the @Right to get that information. Here is an example equation that should work.
@Ctot(@right(DATE_TIME, 8), "HH:MM:SS")