Trying to convert Java Date to type int to fit in mysql table with field type int(11)
I am trying to convert a date such as "dd-MM-yyy" "01/01/2011" to a type int(11) for a mysql database.
The only thing I can find is a conversion to long using the Date class and the simple date formatter.
.getDate is deprecated and only .getTime is available. (which returns type long). If I just cast it from a long to an int I totally lose the date.
Any help would be greatly appreciated.
I said the same thing.. why int(11) for date. :@:
I didn't choose the design actually.. It is for virtue_mart. that is the table structure that the system uses.. I was only concerned with the actual date..
Thanks for you help it is much appreciated!