Discussion posts and replies are publicly visible
vijayanv
Have some default datetime value to display if user hasn't selected anything.
Below snippet would help you.
a!dateTimeField( label: "date and time", value: if( isnull( ri!datetime ), now(), ri!datetime ), saveInto: { ri!datetime, a!save( ri!date, todate( ri!datetime ) ) } )
Depending on the user/environment timezone, this can return a "Date and Time" in the future or past. IE: if the user's timezone setting is 12 hours ahead and they enter this value after 12:00PM than the value saved would be for the next day. I ran into an issue before where we were saving now() for a field and writing it to the DB and our DB was set to GMT while on the Appian side it would pull the result set as EST.