Hi
Ok, i am in a bit of a fix here. Here is my problem:
I have date and time coming to me in
String type. I need to pass this date and time to a single Oracle table Date field. Hence i meed to combine the values of the date and time string variables to a single variable to pass it on to the Oracle Date field. Once passed the date in the Oracle date field should be MM/DD/YYYY HH:MI:SS. To solve this problem i used the java.sql.Timestamp class.
And to initlialize the same I used it constructor method: Timestamp(int year, int month, int date, int hour, int minute, int second, int nano).
Hence i would manually break the data in the string date and time variables and pass it onto the Timestamp constructor. And this is working great. One problem though: The above Constructor is deprecated hence cant use it. Therefore i need to use the second constructor: Timestamp(long time).
But i cant figure out how to use this one. How do i pass the string date and time variable as one long variable to the Timestamp constructor? Or did i get that wrong? Is there any other way to solve this problem?
TIA
Dhanesh.