Chapter 3 DBMS Reference Guide
You can customize the date and time format for test data generation by script or ODBC using DBMS entries in the Format category.
PowerDesigner uses the PhysDataType
map entry in the script\data types category to convert the physical data types of columns to conceptual data types because the DBMS entries are linked with conceptual data types.
Example for Sybase AS Anywhere 7:
Physical data type | Conceptual data type | DBMS entry used for SQL | DBMS entry used for ODBC |
---|---|---|---|
datetime | DT | DateTimeFormat | OdbcDateTimeFormat |
timestamp | TS | DateTimeFormat | OdbcDateTimeFormat |
date | D | DateFormat | OdbcDateFormat |
time | T | TimeFormat | OdbcTimeFormat |
If you want to customize the date and time format of your test data generation, you have to verify the data type of the columns in your DBMS, then find the corresponding conceptual data type in order to know which entry to customize in your DBMS. For example, if the columns use the datetime data type in your model, you should customize the DateTimeFormat entry in your DBMS.
The default date and time format is the following:
'yyyy-mm-dd HH:MM:SS'
{ts 'yyyy-mm-dd HH:MM:SS'}
Where:
Format | Description |
---|---|
yyyy | Year on 4 digits |
yy | Year on 2 digits |
mm | Month |
dd | Day |
HH | Hour |
MM | Minute |
SS | Second |
For example, you can define the following value for the DateTimeFormat entry for SQL: yy-mm-dd HH:MM.
For ODBC, this entry should have the following value: {ts 'yy-mm-dd HH:MM'}.
Copyright (C) 2005. Sybase Inc. All rights reserved. |