ConvertToDbDate
(ODBC Manager Library)| Description | Provides a conversion of a date value into the format used by the indicated database. |
| Returns | The date value, converted to the specified database format |
| Usage | Script only. |
| Related to: | AddConnection | BuildDelete | BuildInsert | BuildSelect | BuildUpdate | ConvertToDbTime | ConvertToDbTimeStamp | ConvertToVTSDate | ConvertToVTSTime | ConvertToVTSTimeStamp | CopyRecords | DBDropList | DBGridList | ErrMessage | ExecuteQuery | ExecuteQueryCached | FlushCache | FormatBatchQuery | GetConnList | ResultFormat | StatsWin | TableSynch | Transaction | TransactionCached |
| Format | \ODBCManager.ConvertToDbDate( dbType, ValueIn[, NoDelimiters]) |
| Parameters |
| dbType | ||||||||||||
Required numeric value, indicating the type of this DB connection.
| ||||||||||||
| ValueIn | ||||||||||||
| Required. Numeric time value expressed in days since January 1, 1970 | ||||||||||||
| NoDelimiters | ||||||||||||
| Optional. Any Boolean expression. If this parameter evaluates to true (non-zero), then text delimiters will be suppressed in the output value. Defaults to true |
| Comments | This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager, as shown in "Format" above. |
Example:
...
{ Convert time & date seperately }
DbDateStr = \ODBCManager.ConvertToDbDate(DbType, Int(GivenTimeStamp / \#SecPerDay), 1 {No delimiters});
DbTimeStr = \ODBCManager.ConvertToDbTime(DbType, GivenTimeStamp % \#SecPerDay, 1 {No delimiters });