Date command summary, date command

Source: Internet
Author: User
Tags time and date

Date command summary, date command

The date command displays or sets the system time and date.

Date (option) (parameter)

-D <string>: displays the date and time specified by the string. Double quotation marks must be added before and after the string;
-S <string>: Specifies the date and time based on the string. Double quotation marks must be added before and after the string;
-U: displays GMT;
-- Help: online help;
-- Version: displays version information.

<+ Time and date format>: Specifies the date and time format used for display.

% H hour, in 24-hour format (00 ~ 23)
% I hour, in 12-hour format (01 ~ 12)
% K hour, in 24-hour format (0 ~ 23)
% L hour, in 12-hour format (1 ~ 12)
% M minutes (00 ~ 59)
% P displays AM or PM
% R display time, in 12-hour format (hh: mm: ss % p)
% S number of seconds that have elapsed since 00:00:00, January 1, January 1, 1970
% S display seconds (00 ~ 59) % T display time, in the 24-hour format (hh: mm: ss)
% X display time format (% H: % M: % S)
% Z display time zone, date domain (CST)
% A (Sun ~ Sat)
% A full name of the Week (Sunday ~ Saturday)
% H, % B (Jan ~ Dec)
% B FULL NAME (January ~ December)
% C date and time (Tue Nov 20 14:12:58 2012)
% D the day of the month (01 ~ 31)
% X, % D Date (mm/dd/yy)
% J the day of the year (001 ~ 366)
% M month (01 ~ 12)
% W the day of a week (0 represents Sunday)
% W the week of the year (00 ~ 53, Monday is the First Day)
% Y the last two digits of the year (1999 is 99)

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.