I have a query which fetches data and time from db, I am using addtime method of mysql to concat the two columns and return a single column.
IN mysql 5.5 the same query gave the result with return type as timestamp in java. I upgraded the db to 5.6 and now the result is in string and so the code gives exception that "String cannot be cast to Timestamp". My Query is
SELECT offerId ,
status,
ADDTIME(effective_date_end, effective_time_end) asn endDateTime from offer
Data type of effective_date_end is date and that of effective_time_end is time.
After getting the result i am doing this in my java code.
java.sql.Timestamp)offerDetailMap.get("endDateTime")
This line now gives error.
Is there any way to get the two fields merged and return a time stamp in mysql 5.6?