Hello Everyone,
We have the following mysql timetampe field
startdate | timestamp | NO | | -00-00 00:00:00
When trying to insert a long value in there:
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
c.getTimeInMillis();
We are presented with the following error:
com
Nick,
You should have answered your own question in the text.
The MySql TIMESTAMP type is, as all other timestamps in the *nix
world, a count of seconds since epoch time. The Java function you are
using yields MILLI-seconds. Divide it by 1000 and you should be good
to go.
On Wed, Aug 21, 2013
2013/08/21 18:03 -0400, Nick Khamis
We have the following mysql timetampe field
startdate | timestamp | NO | | -00-00 00:00:00
When trying to insert a long value in there:
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
c.getTimeInMillis();
We are presented w
On Wed, Aug 21, 2013 at 10:39 PM, wrote:
> 2013/08/21 18:03 -0400, Nick Khamis
> We have the following mysql timetampe field
>
> startdate | timestamp | NO | | -00-00 00:00:00
>
> When trying to insert a long value in there:
>
> Calendar c = Calendar.getInstance(TimeZone.getTi
Sorry, as was mentioned earlier:
select FROM_UNIXTIME(1377196112065/1000);
+---+
| FROM_UNIXTIME(1377196112065/1000) |
+---+
| 2013-08-22 18:28:32 |
+---+
Have a good day everyone :)
Ni
2013/08/22 14:22 -0400, Nick Cameo
SimpleDateFormat sdf = new SimpleDateFormat("-MM-dd'T'HH:mm:ss", new
Locale("en", "US"));
Well, you have your answer (FROM_UNIXTIME( /1000)), but that stupid ISO
format with 'T' in the middle does not work, because to MySQL letters are n