convert date and time to integer

Posted on 2006-11-07
Last Modified: 2008-02-01

Please assist how can we convert date and time value to integer?

Question by:FrankPorter
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 14

Assisted Solution

mherchl earned 50 total points
ID: 17890643

can you give an example, what you exactly want to do?

LVL 19

Accepted Solution

VoteyDisciple earned 350 total points
ID: 17890691
If you're trying to get a PHP timestamp, the way to do it is just:

FROM the_table;

LVL 35

Assisted Solution

Raynard7 earned 100 total points
ID: 17894937
I'd reccomend that you use UNIX_TIMESTAMP

however you could also use a number yyyymmddhhnnss which would also be an integer (the maths would not be good with it either)
Date_Format(now(), '%Y%m%d%H%i%S')

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql ide 10 55
How to fix Datetime in MySQL? 4 75
MySQL limit and not so limited 13 60
mysql workbecn having problems to export tables to cvs 4 27
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question