Can the date value from DateClick Calendar event be converted to datetime?

I’m using the DateClick Calendar event to update an input date field in a form. The value from this event is only available as a date. I cannot save this value in the DB as the field type in DB for saving this value is datetime.

Can this value in date format from DateClick event be converted to a datetime format? Any tips to convert the values are much appreciated.

When inserting you could simply add 00:00:00 or some other arbitrary time using formatDate

E.g.

datefield.formatDate('yyyy-MM-dd 00:00:00')
2 Likes

This is working exactly as required! Thanks Ben :slight_smile:

1 Like