Local Test Cases:
# there can be no spaces on either side of the equal sign, before the error has been out here
yesterday= ' date-d last-day +%y-%m-%d '
echo $yesterday
curday= ' Date +%y-%m-%d '
echo $curday
echo "Now time: ' Date ' +%y%m%d%T '"
DateTime is the most commonly used date type in SQL.Storage size: 8 bytes;Date range: 1753-01-01 to 9999-12-31;Accuracy: 3.33 ms;Common Date function getdate () Gets the current date of the systemSelect GETDATE ()DatePart (Part,dtvalue) Gets the
The following summarizes the implementation methods for obtaining a specified date in Java. For more information, seeCopy codeThe Code is as follows:Format a Date String --> Date or Data --> String
SimpleDateFormat sdf = new SimpleDateFormat
Format Date string-->date or data-->stringSimpleDateFormat SDF = new SimpleDateFormat ("Yyyy-mm-dd");Date date = Sdf.parse ("2009-11-04");//string-->dateString sdate = Sdf.format (date);//Data-->string ================================================
Java get millisecond: system. currenttimemillis () Java get nanosecond: system. nanotime () (used to get very accurate time, recommended !) Java obtains the current date: gregoriancalendar date_1 = (gregoriancalendar) calendar. getinstance (); Java.
Today we see in PHP to calculate the time difference between two times, the following we directly use the Data,strtotime and three functions are implemented, there is a need for friends to refer to.
This is the example that needs to be told today.
JSON date to JS date, we know that after the date type is converted to JSON, the returned data looks like this:
/date (1379944571737)/
But this date does not appear directly, because no one knows what it means, and here's a way to turn the JSON
Format Date string-->date or data-->string simpledateformat sdf = new SimpleDateFormat ("Yyyy-mm-dd"); Date date = Sdf.parse ("2009-11-04");//string-->date String sdate = Sdf.format (date);//Data-->string ===========
=================================
This article mainly introduces the implementation of PHP for the date, month, days, weeks, hours, minutes, seconds, such as the addition and subtraction, combined with examples of the form of a simple date-time algorithm based on strtotime, very
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.