Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_DbConnectDatabase Access Wrapper

Public Function DateTimeToSQLTextWithDelimiterFormat (
d,
AsFormat As xf_SQLStatementFormatEnum
) As String

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

d as Variant

The date

AsFormat as xf_SQLStatementFormatEnum

The xf_SQLStatementFormatEnum setting to determine the correct Jet or MSSQL date delimiters

Call Template:

Dim s As String
s = xf.DbConnect.DateTimeToSQLTextWithDelimiterFormat(d, AsFormat)

See Also:

Example 1:

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!)
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd