Skip to main content.

PX_TIMESTAMP2STRING

Name

PX_timestamp2string -- Convert paradox timestamp into formated string

Synopsis

#include <paradox.h>

char * PX_timestamp2string(pxdoc_t *pxdoc, double timestamp, const char *format)

DESCRIPTION

Creates a string representation of a paradox timestamp as specified in the parameter format. The timestamp must be either retrieved with PX_get_data_double(3) after calling PX_get_record(3) or by simply using the double value in the pxval_t struct as returned by PX_retrieve_record(3). A timestamp contains both time and date information. The format string contains chars which stand for certain values of the date/time. The following table lists all available characters with a meaning. All other characters are being copied unmodified to the output string. If a special character shall not be interpreted it must be preceded with a backslash.

Table 1. Characters and their meaning in date/time format string

CharacterMeaning
Yyear, numeric, 4 digits
yyear, numeric, 2 digits
mmonth, numeric
nmonth, numeric, no leading zeroes
dday of the month, numeric
jday of the month, numeric, no leading zeros
Hhour, numeric, 24 hour format
hhour, numeric, 12 hour format
Ghour, numeric, 24 hour format, no leading zeroes
ghour, numeric, 12 hour format, no leading zeroes
iminutes, numeric
sseconds, numeric
AAM/PM
aam/pm
Lboolean for leap year

RETURN VALUE

Returns pointer to string on success and NULL on failure.

AUTHOR

This manual page was written by Uwe Steinmann .

Latest News

Released version 0.6.6

April 07, 2016

This release fixes some more typos in the documentation.

Released version 0.6.5

Jannuary 11, 2012

pxlib isn't dead, its development has just slowed down. This release fixes some typos and optimizes the configuration process.

Released version 0.6.2

September 19, 2007

This one fixes a long lasting bug on 64 bit architectures. It also is compilable in a mingw environment and Visual C++ with the help of cmake.

Released version 0.6.1

March 29, 2006

There were some bugs related to the changes of the last release. This version fixes them. Besides that the following has changed:

  • Much better support for secondary indexes
  • PX_insert_record() and PX_update_record() treat null values propperly
  • PX_delete_record() now updates the internal index without corrupting it.
  • Various man page updates.
  • Auto increment fields of type pxfAutoInc.
  • Fixed some compile errors and warnings.
  • Fixed various small bugs and memory leaks.

Released version 0.6.0

February 6, 2006

This version includes some major changes to the api while retaining compatible to older versions. If you use the new functions expect bugs but also a much simplier record handling.

  • Databases can be read and written after opening with PX_open_xxx()
  • Use a cache for reading encrypted blobs
  • Added new functions PX_delete_record(), PX_update_record(), PX_insert_record(), PX_retrieve_record()
  • reading and writing encrypted blob files is more efficient.
  • No more than 64 blobs will be stored in blocks of type 3
  • Fixed various small bugs and memory leaks.

Released version 0.5.1

August 11, 2005

  • fixed bug when reading header of blob (Thanks to Giovanni Giacobbi)
  • fixes bug when reading blobs of a certain size from an encrypted .mb file.
  • reading and writing encrypted blob files is more efficient.

Released version 0.5.0

July 14, 2005

  • support for encrypted databases and blob files

New web site

02 Feb 05

After a long time the web site has been overhauled with much more information about pxlib.