Edit DateTIme

Currently need to add minutes (integer value) to a current time In order to achieve this, my idea is to edit the Current date time retrieve, obtain only the time info, as an integer to then add the minutes. I try with passing the CurrentDateTime retrieve  to a string, and I’m stuck here because I need to get only the time value, with hours, minutes and seconds, and i cant obtain this so far. how can I get only the time in order to make the add operation?   Since I can only add two values that are integer/long or decimals, how you do this?   I review the documentation on https://docs.mendix.com/refguide/xpath-hours-from-datetime/, minutes and second, also the trim documentation, but doesn’t work, I feel like I’m over complicating myself, is it any simple way to do this? any suggestions?     
2 answers

Hi Constanza,


if you’re doing this in a variable, it’s used like this:




To answer your other question, in a microflow you can use the formarDateTime function to format the date to a string with the pattern of your choice. Documentation: https://docs.mendix.com/refguide/parse-and-format-date-function-calls/


If you want to do this on screen, you can edit the field/column and use the Formatting option.

when using the custom date format option, you can use the following to get the result you request: