Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

px_timestamp2string(3) [debian man page]

PX_TIMESTAMP2STRING(3)					     Library Functions Manual					    PX_TIMESTAMP2STRING(3)

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. Characters and their meaning in date/time format string Character Meaning Y year, numeric, 4 digits y year, numeric, 2 digits m month, numeric n month, numeric, no leading zeroes d day of the month, numeric j T{ day of the month, numeric, no leading zeros T} H hour, numeric, 24 hour format h hour, numeric, 12 hour format G T{ hour, numeric, 24 hour format, no leading zeroes T} g T{ hour, numeric, 12 hour format, no leading zeroes T} i minutes, numeric s seconds, numeric A AM/PM a am/pm L boolean for leap year RETURN VALUE
Returns pointer to string on success and NULL on failure. SEE ALSO
PX_time2string(3), PX_date2string(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_TIMESTAMP2STRING(3)

Check Out this Related Man Page

PX_RETRIEVE_RECORD(3)					     Library Functions Manual					     PX_RETRIEVE_RECORD(3)

NAME
PX_retrieve_record -- Returns record in Paradox file SYNOPSIS
#include <paradox.h> pxval_t ** PX_retrieve_record(pxdoc_t *pxdoc, int recno) DESCRIPTION
Returns the record with the given number in a Paradox file. The first record has number 0, the last one has number_of_records-1. If you are accessing several records, do it in ascending order, because this is the most efficient way. The return value is an array of field values. Each value is stored in a structure like the following: typedef struct px_val pxval_t; struct px_val { char isnull; int type; union { long lval; double dval; struct { char *val; int len; } str; } value; }; The element isnull is set to 1 if the value is NULL otherwise it is set to 0. type is the type of the paradox field as defined in paradox.h. A field value can be either a long int, a double or a string, depending on the paradox field type. The paradox field types pxfShort, pxfLong, pxfDate, pxfTime, pxfLogical, and pxfAutoInc are returned as long int values. pxfTimestamp, pxfNumber, and pxfCurrency are returned as double values and all remaining paradox field types are stored as strings with the length in value.len. You can rely on strings being Null terminated. Blobs are stored as string but are not guarented to be Null terminated. The paradox field types pxfTimestamp, pxfTime, an pxfDate use an uncommon format which can be converted into a string with PX_time- stamp2string(3), PX_time2string(3), and PX_date2string(3). RETURN VALUE
Returns a pointer on success and NULL on failure. SEE ALSO
PX_update_record(3), PX_timestamp2string(3), PX_time2string(3), PX_date2string(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_RETRIEVE_RECORD(3)
Man Page