ConvertToDbTimeStamp

(ODBC Manager Library)
Description:Provides a conversion of a timestamp value into the format used by the indicated database.
Returns:The time value, converted to the specified database format
Usage: Script only.
Related to:AddConnection | BuildDelete | BuildInsert | BuildSelect | BuildUpdate | ConvertToDbDate | ConvertToDbTime | ConvertToVTSDate | ConvertToVTSTime | ConvertToVTSTimeStamp | CopyRecords | DBDropList | DBGridList | ErrMessage | ExecuteQuery | ExecuteQueryCachedFlushCache | FormatBatchQuery | GetConnList | ResultFormat | StatsWin | TableSynch | Transaction | TransactionCached
Format: \ODBCManager.ConvertToDbTime(dbType,  ValueIn[,  NoDelimiters])
Parameters: 
dbType
Required numeric value, indicating the type of this DB connection.
DBTypeMeaning
0MS SQL
1MS Access
2Oracle
3MySQL
4SyBase
ValueIn
Required. Numeric value expressed as a VTScada timestamp
NoDelimiters
Optional. If 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:

This will set DBTime to the time when the module opened, formatted as a MS Access timestamp.

[
  RightNow  { Timestamp in seconds, set when the page opens. };
  DBTime    { The same timestamp formatted for MS Access     };
]
Init[
  RightNow = Now(1); If 1 Main;
  [
    DBTime = \ODBCManager.ConvertToDbTime(1, RightNow);
  ]
]