

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use MySQL FROM_UNIXTIME() function to return datetime value in numeric format?
As we know that we can convert a time of datetime value to an integer by adding 0(+0) to them. In a similar way, we can convert the datetime value returned by FROM_UNIXTIME() function in numeric format. The following example will clarify it more −
mysql> Select FROM_UNIXTIME(1555033470)+0 AS 'Date in Numeric Format'; +------------------------+ | Date in Numeric Format | +------------------------+ | 20190412071430.000000 | +------------------------+ 1 row in set (0.00 sec)
After adding 0 (+0) to datetime value MySQL returns the numeric value up to 6 digits microseconds.
- Related Questions & Answers
- Extract Numeric Date Value from Date Format in MySQL?
- How to convert MySQL DATETIME value to JSON format in JavaScript?
- Adding a day to a DATETIME format value in MySQL?
- Add10 minutes to MySQL datetime format?
- How to return table from MySQL function?
- How to return a value from a JavaScript function?
- How to return variable value from jQuery event function?
- How to convert string to 24-hour datetime format in MySQL?
- How to select return value from MySQL prepared statement?
- How do I re-format datetime in MySQL?
- Input type DateTime Value format with HTML
- How to use a function for default value in MySQL?
- How can we convert TIME and DATETIME values to numeric form in MySQL?
- Insert current date in datetime format MySQL?
- How to use comparison operator for numeric string in MySQL?
Advertisements