Start date of the current time week (as of Monday) Select DATEADD (Week,datediff (Week,0,getdate ()), 0)Last week start: Select DATEADD (Week,-1,dateadd (Week,datediff (Week,0,getdate ()), 0))Last week start: Select DATEADD (Week,-2,dateadd
Php date instance: get last week, this week, last month, this month, this quarter, last quarter
For example, php obtained last week, this week, last month, this month, this quarter, and the last quarter.
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 '"
The Ext.date is a single example that encapsulates a series of date manipulation functions, extending the functionality of JavaScript date, and lists some of the common features listed below. Basic functions:
The
Ext.Date.add (date,
Use php to obtain the code for this week, last week, this month, last month, and this quarter. Copy the code as follows: echodate (Ymd, strtotime (now), n; echodate (Ymd, strtotime (-1 weekMonday), n; echodate (Ymd, strtotime (-1 weekSunday), n;
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.
Date and Time functionsThis chapter discusses some functions that can be used to manipulate time values. See section 11.3, "Date and Time type" for valid formats for each time and date type with a range and a specified value.
The following example
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 ===========
=================================
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.