| View previous topic :: View next topic |
| Author |
Message |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Wed Jun 09, 2010 2:40 pm Post subject: Need help with encryption in mysql. |
|
|
So these two values are dates and times.
1276057401 = 08 Jun 2010 09:23 pm
1276056443 = Some time before that.
Any idea how I can make my own dates in that format?
|
|
| Back to top |
|
 |
Cheat Engine User Something epic
Reputation: 61
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Wed Jun 09, 2010 2:48 pm Post subject: |
|
|
| date("CODE HERE", 1276056443); I believe.
|
|
| Back to top |
|
 |
Aniblaze Grandmaster Cheater Supreme
Reputation: 138
Joined: 23 Apr 2006 Posts: 1757 Location: The Netherlands
|
Posted: Wed Jun 09, 2010 2:53 pm Post subject: |
|
|
That's a timestamp. It's the current time in seconds, measured from Januari 1st, 1970. You can make it by setting the column type to timestamp, and then just insert a date using something like
INSERT INTO someTable(timestampColumn) VALUES (DATE('2010-06-09'))
If you wish to print out a timestamp, use:
SELECT DATEFORMAT(timestampColumn, '%Y-%m-%d') FROM someTable
Last edited by Aniblaze on Wed Jun 09, 2010 2:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Wed Jun 09, 2010 2:54 pm Post subject: |
|
|
Oh, I think I figured it out, I was trying to do this inside mysql without php.
| Augustine wrote: | That's a timestamp. It's the current time in seconds, measured from Januari 1st, 1970. You can make it by setting the column type to timestamp, and then just insert a date using something like
INSERT INTO someTable(timestampColumn) VALUES (DATE('2010-06-09')) |
Right, I looked it up and found out it was seconds.
So to get a date earlier than 1970, I do negative seconds?
Badass.
Last edited by Cryoma on Wed Jun 09, 2010 2:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
Loganator Master Cheater
Reputation: 4
Joined: 29 Oct 2008 Posts: 472
|
Posted: Wed Jun 09, 2010 2:54 pm Post subject: |
|
|
| I am learning Javascript.
|
|
| Back to top |
|
 |
To0k :] Advanced Cheater
Reputation: 4
Joined: 08 Jun 2010 Posts: 79
|
Posted: Wed Jun 09, 2010 2:55 pm Post subject: |
|
|
| 4 8 15 16 23 42
|
|
| Back to top |
|
 |
Aniblaze Grandmaster Cheater Supreme
Reputation: 138
Joined: 23 Apr 2006 Posts: 1757 Location: The Netherlands
|
Posted: Wed Jun 09, 2010 2:55 pm Post subject: |
|
|
| Stone wrote: | | Oh, I think I figured it out, I was trying to do this inside mysql without php. |
| Augustine wrote: | That's a timestamp. It's the current time in seconds, measured from Januari 1st, 1970. You can make it by setting the column type to timestamp, and then just insert a date using something like
INSERT INTO someTable(timestampColumn) VALUES (DATE('2010-06-09'))
If you wish to print out a timestamp, use:
SELECT DATEFORMAT(timestampColumn, '%Y-%m-%d') FROM someTable |
|
|
| Back to top |
|
 |
|