I wrote a function that got a Timestamp (year, month, day, hour, min and sec) as a parameter.
I just now find that instead of getting a Timestamp type, I got a long type - after the next stpes:
The constructor is:
protected SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
and then:
long qu = dateFormat.parse("24.12.2011 18:54:23").getTime();
I try to find how to convert the qu, back to SimpleDateFormat and then to Timestamp, or directly: from long to Timestamp (But where long was created after these two steps
).
eariler, I ask how to convert long to Timestamp. The answer was given is correct, but Im afraid that this is not the case when I convert it from SimpleDateFormat to long (the function doesn't work after the change).
Thanks.