How to convert the date from bonita format to yyyy/mm/dd?
First, you are probably using Java 8 - in which case drop the java.util.date and use the new java.time imports. Much better for date and time manipulation.
See here for more information:
http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html
http://www.vogella.com/tutorials/JavaDateTimeAPI/article.html
Here you can then use DateTimeFormatter.ofPattern("YYYY/MM/DD") construct.
I wouldn't do the conversion in the form, but only in the process stream before the update to the database using a service task (or the task output operation). Or in the SQL statement itself, such as
This is fro PHP so change the formats and variables as necessary...
regards
Comments
i have created this mysql query , but didn't work:
INSERT INTO it
.documentation
('james','a','b', STR_TO_DATE('${fecha}','%Y-%m-%d')
where i have the wrong?
I think that the wrong is in variable ${fecha}.
i have reviewed the variable that contain the date, that the user has selected, and i see that it saved with this format : 1 de octubre de 2015., this is the reason that why didn't work.
I have changed this format ,but when i execute the process , the format is the same, and finally it didn't work the insert query .
I have tried the insert query with workbench and it worked well .
as yo i say in the previous post , the problem is with the variable that are there in the insert query , because i can see that its value is : 10 october...etc , and not is 2015-01-01 , for example.
so ..
How i can change the format of date variable .?
Tengo el mismo problema alguien lo resolvio?
Comments
I have created this code:
Then what i want to do is retrieve the date that the user has selected and then convert its format from this Mon Oct 05 21:11:32 2015 or this DD/MM/YYYY to this YYYY/MM/DD.
i don't know where i can put this code into my workflow in order to do it .
I'm doing this because i need the dates with this format :yyyy/mm/dd , in order to put in a insert query , because my database use this format
regards
Somebody has any idea?