You can optionally give FROM_UNIXTIME function a format parameter : FROM_UNIXTIME « Date Time Functions « MySQL Tutorial

MySQL Tutorial
1. Introduction
2. Select Query
3. Database
4. Table
5. Table Join
6. Subquery
7. Insert Update Delete
8. Logic Operator
9. View
10. Data Types
11. Procedure Function
12. Cursor
13. Trigger
14. Date Time Functions
15. Comparison Functions Operators
16. Aggregate Functions
17. Cast Functions Operators
18. Control Flow Functions
19. Encryption Compression Functions
20. Information Functions
21. Math Numeric Functions
22. Miscellaneous Functions
23. String Functions
24. Regular Expressions
25. Data Dictionary
26. MySQL Utilities
27. Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
MySQL Tutorial » Date Time Functions » FROM_UNIXTIME 
14. 19. 3. You can optionally give FROM_UNIXTIME function a format parameter

DATE_FORMAT and TIME_FORMAT Output Formats

format ParameterOutput Format
%r12-hour time (hh:mm:ss (AM|PM))
%T24-hour time (hh:mm:ss)
%YNumeric year, 4 digits
%yNumeric year, 2 digits
%mMonth with leading 0 (01, 02-12)
%cMonth without leading 0 (1, 2-12)
%MMonth name (January, February, and so on)
%bMonth name, abbreviated (Jan, Feb, and so on)
%DDay of the month with an English suffix (1st, 2nd, and so on)
%dDay of the month with leading 0 (00, 01, 02-31)
%eDay of the month without leading 0 (0, 1, 2-31)
%WWeekday name (Sunday, Monday, and so on)
%aWeekday name, abbreviated (Sun, Mon, and so on)
%HHour (00, 01-23)
%kHour (0, 1-23)
%hHour (01, 02-12)
%IHour (01, 02-12)
%lHour (1, 2-12)
%iMinutes (00, 01-59)
%SSeconds (00, 01-59)
%sSeconds (00, 01-59)
%PAM or PM
%UWeek number in the year,in which Sunday is the first day of the week
$uWeek number in the year,in which Monday is the first day of the week
%X & %VYear and week number, respectively,in which Sunday is the first day of the week
%x & %vYear and week number, respectively,in which Monday is the first day of the week
%jDay of year with leading 0's (001, 002-366)
%wWeekday number (0=Sunday, 1=Monday, and so on)
%%Literal %


mysql>
mysql> SELECT FROM_UNIXTIME(1000000000'%W, %M');
+-------------------------------------+
| FROM_UNIXTIME(1000000000'%W, %M') |
+-------------------------------------+
| Saturday, September                 |
+-------------------------------------+
row in set (0.00 sec)

mysql>
14. 19. FROM_UNIXTIME
14. 19. 1. FROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)
14. 19. 2. SELECT FROM_UNIXTIME(1111885200);
14. 19. 3. You can optionally give FROM_UNIXTIME function a format parameter
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.