How do I convert to/from datetime

I have a simple SQL table that has a datetime column “EntryDate”.
I have the data from that SQL table displayed in an editable Appsmith Table Widget. I have the column in the Appsmith Table Widget set to Column Type “Date” and I have both the Original Date Format and Display Date Format set to “YYYY-MM-DD HH:mm”.

I would like to implement a “Delete” button in the Appsmith Table that deletes from the SQL table when clicked. I have the query

DELETE FROM SQLTable
WHERE 
EntryDate = {{TableAdvisorNote.selectedRow.EntryDate}}

set to the onDiscard event

when I click the button I get the following error

Arithmetic overflow error converting expression to data type datetime.

In the debug console it appears that the data being based is a Unix timestamp(?) or some other form of a datetime.

I have been searching to figure out if the data shown in the Appsmith Debug console is the raw data from SQL (long int) or if Appsmith is converting it somewhere or something else…

How do I convert from whatever Appsmith thinks the data in the EntryDate column is to what SQL thinks the data is in EntryDate?

I think I figured it out…

DELETE FROM SQLTable 
WHERE 
EntryDate = '{{moment(TableAdvisorNote.selectedRow.EntryDate).utc().format('YYYY-MM-DD HH:mm:ss.SSS')}}'