Discussion:
[FreeMarker-user] Facing problem with datetime Built-In
Rohit Koushal
2016-06-02 11:38:04 UTC
Permalink
Hello everyone,

I am facing one problem with date string when used with datetime built-in.
Below is the syntax that I am using :

${parameters.minDate?datetime("yyyy-MM-dd HH:mm:ss")}

and getting error message like :

FreeMarker template error: The string doesn't match the expected
date/time/date-time format. The string to parse was: "2016-05-21
18:15:22.0". The expected format was: "yyyy-MM-dd HH:mm:ss". The
nested reason given follows: Unparseable date: "2016-05-21
18:15:22.0"
From the error message it look like date colons(:) got replaced with ":".
Does anyone point me what I am doing wrong.

-----------------
Thanks and Regards
Rohit Koushal
Daniel Dekany
2016-06-02 18:50:17 UTC
Permalink
I can't think of any FreeMarker mechanism that could cause that, so
certainly the string is already ":"-ed before it reaches
FreeMarker.

BTW, where did you find the freemarker-***@lists.sourceforge.net mail
address? This list was replaced by
***@freemarker.incubator.apache.org. Is it still there on some well
visible place?


Is it still there
Post by Rohit Koushal
Hello everyone,
I am facing one problem with date string when used with datetime
${parameters.minDate?datetime("yyyy-MM-dd HH:mm:ss")}
FreeMarker template error: The string doesn't match the expected
date/time/date-time format. The string to parse was: "2016-05-21
18:15:22.0". The expected format was: "yyyy-MM-dd
"2016-05-21 18:15:22.0"
From the error message it look like date colons(:) got replaced
with ":". Does anyone point me what I am doing wrong.
-----------------
Thanks and Regards
Rohit Koushal
--
Thanks,
Daniel Dekany
Loading...