DAte widget

Kindly please can someone help me
how to get the exact date from date widget and store it in y database.

i am using some variable to stored some data like the dates choose by the actor while running the application and using it to store on my database?
i usually encountered problems and doesn’t which query should i use to convert the object into date format.

thank you so much,
jaylongkit:)

Assuming that you already have a MySql connector in place, to insert a date value into the database, you need to properly format it first in the query.

Example:

import java.text.DateFormat; import java.text.SimpleDateFormat;

DateFormat mySimpleDateFormat = new SimpleDateFormat(“YYYY-MM-dd HH:mm:ss”);

// The timestamp needs to be properly formatted.

String query = “insert into my_table (entry_created_on) values ('”+mySimpleDateFormat.format(value)+“')”

return query

entry_created_on in this case is the name of the column in the database and value the name of the variable in bonita that is mapped to the date field on the form.

which database are you using?

which database are you using?

My Sql database

THank you so much:) jeremykent2726_1

it helps me a lot:)

it works:)