Best Way to Convert Date Strings to Timestamps in Dynatrace DQL?

Hello Team ,

I have a field in my logs that contains the date and time, but the field type is a string. Is there a way to convert this field into a timestamp? I tried the totimestamp function, but it isn’t working. The field is in the format MM/DD/YYYY HH:MM:SS.

Please let me know if anyone has a solution for this?

Regards,

Akhil Jayendran

You need to use the parse command and DPL with timestamp matcher:

data record(str="11/30/2025 08:02:20")
| parse str, """TIMESTAMP("MM/dd/yyyy HH:mm:ss"):ts"""