Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

hallo leute!

wie bekomme ich den das datum z.B. ( 25.03.2003 ) in das korrekte timestamp umgewandelt?!?!?! please help...

zurück kann ichs... :rolleyes:

Tach!

String mit:

array explode ( string separator, string string [, int limit])

splitten und mit:

int mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]])

Timestamp erzeugen.

Gruß Jaraz

Original geschrieben von palvoelgyi

Hallo,

das ist doch ziemlich simpel.

25.03.2003 = 20030325000000 (JJJJMMTTSSMMSS)

Du schreibst Dir eine kleine Funktion, die in dem Datum substrings macht und dann das Datum neu zusammen setzt.

Frank

Ähm, das ist kein Timestamp. Der UNIX-Timestamp gibt die vergangenen Sekunden seit dem 1.1.1970 0:00 Uhr an. Was du da zusammengefügt hast, ist wohl nicht das gleiche.

Ich übersetzt die Funktionen von Jaraz mal auf deinen Datumsstring 25.03.2003.


$datum='25.03.2003';
$timearray=explode ( '.', $datum);
$timestamp=mktime ( 0,0,0,$timearray[1],$timearray[0],$timearray[2]);
[/PHP]

Raus kommt 1048546800.

ich habs gestern noch hinbekommen. danke ;)

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.