PX_TIMESTAMP2STRING(3)
π PX_TIMESTAMP2STRING(3) π
okay bestie, welcome to the PX_timestamp2string page from the Library Functions Manual πΈ this one is lowkey iconic, it's all about turning a paradox timestamp into a cute lil formatted string β¨
π NAME π
PX_timestamp2string β converts a paradox timestamp into a formatted string π
β¨ SYNOPSIS β¨
#include <paradox.h>
char * PX_timestamp2string(pxdoc_t *pxdoc, double timestamp, const char *format)
π¦ DESCRIPTION π¦
so basically, this function makes a string representation of a paradox timestamp, and it does it exactly how you tell it to in the format parameter π«Ά
now, the timestamp you pass in has to come from one of two places, no exceptions:
- you grabbed it with
PX_get_data_double(3)after callingPX_get_record(3), or - you just used the
doublevalue straight out of thepxval_tstruct thatPX_retrieve_record(3)handed you
either way, a timestamp is giving both time and date energy β it's not one or the other, it's the whole package π
the format string is where the magic happens. it's full of chars, and each char stands for a specific value of the date/time. here's the whole list, no skips, no gatekeeping:
π₯ Characters and their meaning in date/time format string π₯
Yβ year, numeric, 4 digitsyβ year, numeric, 2 digitsmβ month, numericnβ month, numeric, no leading zeroesdβ day of the month, numericjβ day of the month, numeric, no leading zerosHβ hour, numeric, 24 hour formathβ hour, numeric, 12 hour formatGβ hour, numeric, 24 hour format, no leading zeroesgβ hour, numeric, 12 hour format, no leading zeroesiβ minutes, numericsβ seconds, numericAβ AM/PMaβ am/pmLβ boolean for leap year
and the rest? every other character just gets copied unmodified straight to the output string, no notes, no changes π
β οΈ but bestie listen β if you've got a special character that you do NOT want interpreted, you have to precede it with a backslash. otherwise it's getting read as a format char, periodt. π
π RETURN VALUE π
- returns a pointer to string on success π
- returns
NULLon failure π
π SEE ALSO π
πΈ AUTHOR πΈ
this manual page was written by Uwe Steinmann <uwe@steinmann.cx> π
and that's the whole page, bestie!! this one lives in the Library Functions Manual alongside PX_TIMESTAMP2STRING(3) β no date stamp on this baddie, it's timeless fr fr β¨ go format some timestamps, you're gonna ate π«Άπ
π¦ where this page comes from
- debian bookworm: pxlib-dev 0.6.8-1+b1
- debian trixie: pxlib-dev 0.6.9-1+b1
- ubuntu jammy: pxlib-dev 0.6.8-1
- ubuntu noble: pxlib-dev 0.6.8-1
- ubuntu questing: pxlib-dev 0.6.9-1
- ubuntu resolute: pxlib-dev 0.6.9-1build1
- ubuntu stonking: pxlib-dev 0.6.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms