Dynamic Web Pages: deutschsprachiger PHP Knotenpunkt seit 1999

Dynamic Web Pages : deutschsprachiges PHP-Handbuch : px-date2string _

  PHP Journal  
<px_create_fp px_delete_record>
Letzte Aktualisierung: Sun, 23 Nov 2014


(no version information, might be only in CVS)

px_date2string --  Converts a date into a string.


string px_date2string ( resource pxdoc, int value, string format )

Turns a date as it stored in the paradox file into human readable format. Paradox dates are the number of days since 1.1.0000. This function is just for convenience. It can be easily replaced by some math and the calendar functions as demonstrated in the example below.

Parameter Liste


Resource identifier of the paradox database as returned by px_new().


Value as stored in paradox database field of type PX_FIELD_DATE.


String format similar to the format used by date(). The placeholders support by this function is a subset of those supported by date() (Y, y, m, n, d, j, L).


Gibt bei Erfolg TRUE zurück, im Fehlerfall FALSE.


Beispiel 1. Turn a paradox date into a human readable form

= px_new();

/* make up a date as it could be stored in */
/* a date field of a paradox db. */
/* 700000 days since 1.1.0000. */
$days = 700000;

/* Use the calendar functions to print a */
/* human readable format of the date */
echo jdtogregorian($days+1721425)."\n";
/* px_date2string() outputs the same */
echo px_date2string($px, $days, "n/d/Y")."\n";


Das oben gezeigte Beispiel erzeugt folgende Ausgabe:


<px_create_fp px_delete_record>
Letzte Aktualisierung: Sun, 23 Nov 2014

powered by Hetzner
top Alle Rechte vorbehalten. © Dynamic Web Pages 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 top

Werbung an/aus Werbung aus Werbung an