---
name: "PX_timestamp2string"
section: "3"
platform: "linux"
package: "pxlib-dev"
version: "0.6.9-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PX_timestamp2string"
---

# PX\_timestamp2string(3)

Convert paradox timestamp into formatted string

## NAME

PX\_timestamp2string — Convert paradox timestamp into formatted 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)](/PX_get_data_double/3.md)** after  calling **[PX\_get\_record(3)](/PX_get_record/3.md)** or by simply using the  double value in the pxval\_t struct as returned by  **[PX\_retrieve\_record(3)](/PX_retrieve_record/3.md)**. 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_time2string/3.md), [PX\_date2string(3)](/PX_date2string/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
