cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Error Constructing DateTime: Value not valid date string" on "%z" format specifier (time zone)

"Error Constructing DateTime: Value not valid date string" on "%z" format specifier (time zone)

I noticed that string-based DateTime constructor with "%z" in the format specifier throws an exception:


Code to reproduce this issue:

// exception: Error Constructing DateTime: Value not valid date string.
return DateTime("24/07/2025 08:01:47 +0200", "%d/%m/%Y %H:%M:%S %z").toString("%F %T %z");

 

sastanin_0-1753432723215.png

 

FlexSim 25.2.0 Beta build 94 and earlier versions.

The specifier works correctly in the DateTime.toString method.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea