Read about how to get current date in angular 2, The latest news, videos, and discussion topics about how to get current date in angular 2 from alibabacloud.com
1 "select datepart (weekday, getdate ())
This is the integer of the returned day of the week!
2 "select datename (weekday, getdate ())
This is more convenient. You can directly return the day of the week type. For example, if today is Tuesday, enter Tuesday.
Note: If the obtained Date Field is short integer, for example, the week may be incorrect!
3 "select a as week, getdate () as dateFrom (select a =
We can get the current time by using the Datatime class. We can get different time by calling various methods in the class: Date (2008-09-04), Time (12:12:12), date + time (2008-09-04 12:11:10), and so on.
Get
In the development process, often many people are accustomed to use the new date () to get the current time, it is more convenient to use, but also to get the current time related to all aspects of information, such as get hours,
Ideas:
Get the start and end dates of the current quarter, pushing forward 3 months, the start and end dates of the previous quarter, on the basis of the current date
/** * @param flag true: start date; false: End date * @re
Some of the time-related packages and functions are most used and later used to supplement
Import datetime Import Time # Gets the current period, which contains year, month, hour, which requires import datetime today = Datetime.date.today () print (Toda
Y) print (today.year) print (today.month) print (today.day) ' >>>2017-01-01 >>>2017 >>>1 >>>1 ' ' # to get tomorrow, and the other in turn tomorrow = Today
In Delphi 2009, you need to modify the bass_deviceinfo structure definition in bass. Pas. Otherwise, garbled characters will occur:
// Change bass_deviceinfo = Record Name: pchar; // description DRIVER: pchar; // driver flags: DWORD; end; // to bass_deviceinfo = Record Name: pansichar; // description DRIVER: pansichar; // driver flags: DWORD; end;
In this example:
Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, contro
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.