Convert a date and time to text suitable for use in an SQL query, including date delimiters. The user passes an SQLStatementFormat setting to determine the correct Jet or MSSQL date delimiters The date passed is a variant, and a Null value returns the string: NULL
The date
The xf_SQLStatementFormatEnum setting to determine the correct Jet or MSSQL date delimiters
Dim d as Date d = #23/2/1982 13:40 PM# Debug.Print xf.DbConnect.DateTimeToSQLTextWithDelimiterFormat(d, xf_SQLStatementFormat_JET) #23 Feb 1982 13:40 PM# (in Australia!)