Question: PROBLEM
=======

I need I safely convert the date format in the mySQL database table MYTABLE from the actual **datetime** format field **date**: e.g. 2013-09-10 12:43:03, to its **unix timestamp** equivalent: 1378816983 without compromising the existing thousands of articles already in the database.

I am using PHP, mySql, Drupal.

MY APPROACH
===========

My steps

1. Alter the table field type from datetime to timestamp [DONE]
2. Converting the actual content type field: timestamp [DONE]
3. Converting existing article data field in 4 tables using PHP strtotime() or MYSQL: UNIX\_TIMESTAMP(date)

I NEED HELP ON PT.3
===================

A. a little help on the algorithm at the pt. 3:

e.g.

```
  loop over all 4 tables {

       - create a new column date2 of type: int (or datetime?) 
       - copy all dates from date to date2 passing them through strtotime()
       - delete column date
       - rename column date2 to column date

}

```

Answer: 
you need to pass Context to your GameScreen class ..then define pref as below

```
SharedPreferences settings = context.getSharedPreferences("Prefs", 0);

```

for more details [click here](https://stackoverflow.com/questions/7491287/android-how-to-use-sharedpreferences-in-non-activity-class)
Since you appear to be using LIBGDX, you should use `Gdx.app.getPreferences()` to get the preferences object. This usage will allow you to be more platform agnostic with your preferences.

<http://code.google.com/p/libgdx/wiki/Preferences>