Moin,
komm grad nicht weiter. ich habe ein Longwert =1236325178 aus dem ein Datum erzeugt werden sollte.
Es wird aber ein falsches Datum erzeugt.
Alles anzeigen
das ganze liefert mir 24.12.1969 19:16:36
sollte aber 06.03.200908:39
das ganze habe ich mit JS überprüft
seh da grad nicht mein fehler
komm grad nicht weiter. ich habe ein Longwert =1236325178 aus dem ein Datum erzeugt werden sollte.
Es wird aber ein falsches Datum erzeugt.
Quellcode
- Date the_date = new Date(int_dat*1000);
- int mon =the_date.getMonth()+1;
- int tag = the_date.getDate();
- int jahr = the_date.getYear();
- int std = the_date.getHours();
- int min = the_date.getMinutes();
- String mon =( mon<10 ? "0" :"")+mon;
- String tag = ( tag<10 ? "0" :"")+tag;
- String std = ( std<10 ? "0" :"")+std;
- String min = ( min<10 ? "0" :"")+min;
- String datum = jahr + "-" + mon + "-" + tag + " "+ std + ":" + min;
das ganze liefert mir 24.12.1969 19:16:36
sollte aber 06.03.200908:39
das ganze habe ich mit JS überprüft
seh da grad nicht mein fehler

MfG ShureG
There are 10 kinds of people. Those who understand binary notation, and those who do not.
There are 10 kinds of people. Those who understand binary notation, and those who do not.