How do I write a SQL query involving a time stamp?

QUOTE_ID is a character string
CREATE_DTG is a date time type
RETENTION_LEAD_TRACK is a table

This sql statement

cmf.CommandText = "SELECT QUOTE_ID FROM RETENTION_LEAD_TRACK where CREATE_DTG > '2016 - 04 - 25 18:18:15.2891'"

throws this error

 {"Conversion failed when converting date and/or time from character string."}

I'd remove the spaces from the date string to start with: 2016-04-25 18:18:15.
That would probably fix it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.