wwUtils::TimeToCStrict

Creates a VFP strict date string that can be used in literal SQL strings. Simplifies creating dynamic SQL statements that are date safe. Optional pass the llSQL flag as .T. to have a SQL Server compatible date string returned.

o.TimeToCStrict(ltTime, llSQL)

Return Value

string or empty string if an invalid date was passed.

Parameters

ltTime
Time to convert

llSQL
Return the time as a SQL Server compatible string that's wrapped in quotes.

Remarks

Returned string format looks like this:

Strict Time:
{^2003/03/24 10:45:21 AM}

Sql Time:
'2003/03/24 10:45:57 AM'


See also:

Library wwUtils

© West Wind Technologies, 1996-2022 • Updated: 11/19/15
Comment or report problem with topic