Datetime input only store year,day,month, hour n minutes, not the second

I have input with this date time input type,

Then when click save button, i wont to store the seconds, so the seconds will be 00

Is there any way to do it? Thanks guys!


hello Bhetrand Dwilangga,

You can used Formatdatetime(value, format you want to store) function for this

Edit: This will give text output. If your attribute is not text then it will be failed

OutSystems will give date (dd/mm/yyyy) and datetime(dd/mm/yyyy HH:MM:SS

if your are storing in text its possible but if your date type is fixed(date or datetime) it won't

thanks and Regards,

akshay Deshpande

oh okayy, i understand.. because of the output is text, that is the reason why i cant solve it.

And if i want to save it to database without the second could it be?

As far as I know you cant its predefined pattern when you are fetching that time you can show the enduser what ever need with the help of format date but for stroing if you are not passing it will give 00 everytime 

Thankyou Akshay!!

Best Regards,


Hi Ran,

You write "when click save button, i wont to store the seconds". However, when you click the save button, I assume it's your own code that gets executed in the Save action, so you can debug and check what value the form field has that is saved to the database. I would assume that value also does not have seconds, but please check to make sure.

thank you for the respond Kilian , already solved


Best Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.