on 12-18-2008 2:58 PM
Hi Experts,
I want to convert java.sql.Timestamp object to com.sap.dictionary.runtime.container.CctDateTime object. I wrote the following code:
CctCode timeZoneCode = new CctCode("CET", null,null,null,null,null);
Timestamp timeStamp = Timestamp.valueOf("2007-01-01 08:00:00.000");
CctDateTime dateTime = new CctDateTime(timeStamp, timeZoneCode, false);
But the above constructor CctDateTime is deprecated.Is there any other way to convert timestamp object to CctDateTime object?
Note: I am working on Netweaver CE
Thanks,
Monideepa
Monideepa,
Try this. I changed boolean value false to Boolean Object with value false.
CctCode timeZoneCode = new CctCode("CET", null,null,null,null,null);
Timestamp timeStamp = Timestamp.valueOf("2007-01-01 08:00:00.000");
Boolean bool = new Boolean(false);
CctDateTime dateTime = new CctDateTime(timeStamp, timeZoneCode, bool);
This works fine.
Deprecated methods or constructors still work anyway but it is a good practice to use suggested alternatives.
Vishwas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.