Dedecms Date and Time Format

Source: Internet
Author: User
Tags month name

Date and Time Format (use the strftime () function to format the time) 0

Home page:
([Field: pubdate function = 'strftime ("% m-% d", @ me) '/]) = (5-15)
([Field: pubdate function = 'strftime ("% B % d, % Y", @ me) '/]) = (May 15,200 8)

List page:
[Field: pubdate function = "getdatetimemk (@ me)"/] = 18:30:02
[Field: pubdate function = "getdatemk (@ me)"/] = 2008-05-15

Content Page:
{Dede: field name = 'pubdate' function = 'getdatemk (@ me) '/} = 2008-05-15
{Dede: field name = 'pubdate' function = 'strftime ("% B % d, % Y", @ me) '/} = may 15,200 8

Use the strftime () function to format the time:

% a short description of the day of the week
% a full name of the day of the week
% B short description of the month
% C standard
the last two digits of % C year
% d decimal indicates the day of the month
% d month/day/year
% E is in a two-character domain, the last two digits of the day in decimal format
% F year-month-day
% G year, which is based on the week year
% G year, use the week-based year
% H abbreviated month name
% H hour in the 24-hour format
% I hour in the 12-hour format
% J decimal the day of each year
% m decimal month
% m decimal number of minutes
% N newline character
% P local AM or PM equivalent display
% R 12 hours
% R display hours and minutes: hh: mm
% s decimal seconds
% t horizontal tab
% t Display hour, minute, second: hh: mm: SS
% u the day of the week, Monday is the first day (the value ranges from 0 to 6, and Monday is 0)
% u indicates the week of the year. Sunday is the first day (ranging from 0 to 53).
% V indicates the week of the year, week-based year
% W decimal indicates the day of the week (value ranges from 0 to 6, and Sunday is 0)
% W indicates the week of the year, use Monday as the first day (from 0 to 53)
% x standard date string
% x standard time string
% Y decimal year without Century (value ranges from 0 to 99)
% Y indicates the tenth year of the century.
% Z, % Z indicates the time zone name. If the time zone name cannot be obtained, an empty character is returned.

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.