TimeFormat
database parameter
Description
When you update data in the DataWindow painter,
PowerBuilder builds a SQL UPDATE statement in the background. The Time
parameter determines how PowerBuilder specifies a time datatype when it
builds the SQL UPDATE statement.
Applies to
ADO.NET
OLE DB
SNC SQL Native Client for Microsoft SQL Server
Syntax
1 |
TimeFormat ='time_format' |
Parameter |
Description |
---|---|
time_format |
The time format you want PowerBuilder to use when For more on display formats, see |
Default value
If no value is specified for the TimeFormat parameter,
PowerBuilder does not use a time datatype.
Usage
When you call stored procedures, the database server might not
accept the time format built by PowerBuilder. If this occurs, you can
try to use another format. For example, for Microsoft SQL Server, try
this format:
1 |
TimeFormat=''''hh:mm:ss'''' |
Examples
Assume you are updating a table named Workhours by setting the
Start column to 08:30. This time is represented by the following
PowerBuilder time format:
1 |
hh:mm |
To specify that PowerBuilder should use this format for the time
datatype when it builds the SQL UPDATE statement:
-
Database profile
Type the following in the Time Format box on the Syntax page
in the Database Profile Setup dialog box:1hh:mm -
Application
Type the following in code:
1SQLCA.DBParm="TimeFormat='hh:mm'"
What happens
PowerBuilder builds the following SQL UPDATE statement to update
the table:
1 2 |
UPDATE WORKHOURS SET START='08:30' |
See also