MySQL: Summary of date functions and time functions bitsCN.com
Published inWww.sqlstudy.com1. MySQL obtains the current date and time function
1.1 obtain the current date + time (date + time) function: now ()
mysql> select now();+-------------------
MySQL obtains the bitsCN of the current date and time (and converts the time. com1.1 obtain the current date + time (date + time) function: in addition to the now () function to obtain the current date and time, MySQL also has the following function:
Two common functions in PHPrand (); Generate random numbers when there are no parameters in parentheses, the system generates random numbers at the current time as a seedrand (1,10); Inside the parentheses is a range of generated random numbers, in
In the PHP code, obtain the current date time and insert it into the database. By default, PHP explains that the displayed time is "linwei governance standard time", which is 8 hours different from our local time, therefore, the time obtained by
1. MySQL obtains the current date and time function1.1 obtain the current date + time (date + time) function: now ()Mysql> select now ();
+ --------------------- +| Now () |+ --------------------- +| 22:20:46 |+ --------------------- +
In addition
Copy Code code as follows:
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan
* MIT License
*
* Includes Enhancements by Scott Trenda
* and Kris Kowal
*
* Accepts a date, a mask, or a date and a mask.
* Returns A formatted version
SQL statement that inserts a table of data, and a specific data (fixed constant) into another sheetInsert into Select Code,0,1,1,1 from Wm_jobpointINSERT into SELECT from Wm_county pThe fields that are inserted here and the fields of the query
1. Get the current time:/** Get the current date + time (date + times) function: Now (), Common **/SelectNow () fromdual;/** Get current timestamp, current_timestamp or Current_timestamp () **/Select Current_timestamp,Current_timestamp() fromdual;/**
1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:current_timestamp () Current_timestamplocaltime () localtimeLocaltimestamp ()
1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:Current_timestamp () Current_timestampLocalTime () localtimeLocaltimestamp ()
OutlineFirst, LSSecond, CDThird, CPIv. DateWu, HwclockVi. getting the use of commands helpVii. Man Document ChaptersViii. Root File systemFirst, LS (list)ls - list directory contentssynopsis ls [ Option]... [file] ... [[email protected] ~]# ls
http://www.verejava.com/?id=16993050424091/** Knowledge Points: Calandar Date processing class */import Java.util.calendar;import Java.util.gregoriancalendar;public class TestCalendar{Publ IC static void Main (string[] args) {//Instantiate
templates | design
Pl/sql DEVELOPER 6 template using series documents (II)
Template Format Design application Guide (translate)
Creating and modifying templates
To modify a template that already exists, select the
Environment: MySQL Server 5.1
Problem: MySQL gets the system's current time function
Solve:
The now () function returns the current date time with ' Yyyy-mm-dd HH:MM:SS ', and can be saved directly to the DateTime field.
Curdate () returns today'
1, Mktime () function:
The UNIX timestamp is returned based on the batch parameter, which needs to be formatted with the date () function to output the date and time.
Example: Use the Mktime () function to get the current time of the system
echo
MySQL time to get a timely conversion between1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:Current_timestamp ()
1.0 Formatting: The Date_format () function is used to display date/time data in different formats.GrammarDate_format (Date,format) The date parameter is a valid day. format Specifies the date/time in which the output is formatted.The formats you
Reference: http://blog.sina.com.cn/s/blog_6d39dc6f0100m7eo.htmlLocaltimestamp () LocaltimestampThese date-time functions are equivalent to now (). Since the now () function is short and easy to remember, it is recommended that you always use now ()
MySQL gets the current date time functionSource: http://www.cnblogs.com/ggjucheng/p/3352280.htmlGet the current date + time (date + times) function: Now ()Mysql> Select Now (); +---------------------+| Now () |+---------------------+| 2008-08-08 22:2
1. display information on the screen.
The most common way to display information is to use the library functions printf () and puts ().
A, escape character.
VcD4KPHA + PGJyPgo8L3A + CjxwPmIs16rSxsu1w/e3 + 6GjPC9wPgo8cD48aW1nIHNyYz0 = "http://
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.