and to me, it should turn the long number, into whatever date that represents, and this works with some numbers. But when I try it with that number in the example (which I have just chosen arbitrarily), I get the error message(at compile time): integer number too large: 99500000000.
Anyway, I really don't understand why I am getting this error, and only this can sum up how I feel !
integers have a maximum size(2^31-1=2147483647) and that number exceeds it. Use an integer that is equal or less then Integer.MAX_VALUE (use this to verify the maximum value). [ April 28, 2006: Message edited by: Rusty Shackleford ]
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
David J Evans
Joined: Apr 28, 2006
Hi, thanks for you reply.
I realise that the upper limit of an integer may be exceeded by that number, but I thought the long data type was for larger numbers?
Either way, what I want to achieve is turning a timestamp, back into a readable date, which I can do in PHP, so I'm sure java has a function to do it. The timestamp for about 2 minutes ago was this 1146261394418, which is 2 digits longer than the number in my example, but is returned through this function, as a long datatype.
So can anyone explain to me what's going on, or just simply, how I can turn my timestamp back into a human readable date.