Product Home
DTM Data Generator Online Documentation
General
Product Profile
Product Versions
Quick Start
Rule Wizard
System requirements
Connect to Database
Execution
Fill Table
Table Fill Modes
Table Fill Options
Row count management
Fill Methods
Method options
Random values
Values list
From table
List from file
From Values Library
Incremental
By mask
By SQL statement
By formula
Field groups
Data Preview
Table Information
Advanced
Data Rule Properties
Project Properties
Tables Selection
Program Settings
File Structure
Values Library
Clear Rule
Project migration
Command Line
Performance Tips
Schema Viewer
Format Strings
Tables Creation Options
Select column
Objects Creation
Data export
How to...
Tools
Random BLOB Loader
Values Library Builder
Additional Info
Product Ordering
Database Utilities
Licence agreement
Demo version
Install
Uninstall
Upgrade
Support
Glossary

Format strings

Data Generator uses C/C++-like format strings. A format string consists of its format specification and the rest of characters that are put into the result unchanged.
A format specification always starts from the % sign. If it is necessary to use this character as a character instead of a formatting element, it should be doubled.

The most useful format types are:

  • %d - a signed decimal integer. You can use width for this field, for example, %5d. If you specify the width as %05d, the program will add non-significant zeros to reach the specified width.
  • %x - a hexadecimal integer. Uses lowercase letters for hexadecimal integers. %X uses uppercase letters.
  • %f - a value in the form dddd.dddd, where dddd is one or more decimal digits. It is possible to specify sizes in the form %5.2f (2 corresponds to the number of decimal digits here, while 5 is the total).
  • %s - a string. '-' (minus) means alignment to the right if it is specified together with the width.