Re: Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-22 Thread hsv
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

Re: Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-22 Thread Nick Cameo
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

Re: Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-22 Thread Nick Cameo
://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql > > What I am trying to accomplish is pass down a valid long value (representative of UTC time) that mysql timestamp field accepts, unix time epoch whatever That way, I do not have to fight with java.sql.timesta

Re: Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-21 Thread hsv
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

Re: Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-21 Thread Michael Dykman
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

Java UTC Calendar and Mysql TimeStamp - Gets me every time!!!!!

2013-08-21 Thread Nick Khamis
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

Re: mysql timestamp

2003-03-12 Thread Paul DuBois
At 12:07 -0500 3/12/03, Jonathan Li wrote: I currently have a table that contains a timestamp(6) column. I need to copy the data in that column to a new table with the column structure as timestamp(14), what is the best way to do it (now that the timestamp structure is changed)? That doesn't matter

mysql timestamp

2003-03-12 Thread Jonathan Li
I currently have a table that contains a timestamp(6) column. I need to copy the data in that column to a new table with the column structure as timestamp(14), what is the best way to do it (now that the timestamp structure is changed)? Thanks Jonathan --- ignore below query sql --- ---