Change date Format in TYPO3


 
For changes in the Date format in TYPO3 you have to made changes in below mention file :
typo3/sysext/css_styled_content/static/setup.txt

In that setup file you can set your date format

10 = TEXT
10 {
field = date
#strftime = %B %e, %y
strftime = %e-%m-%y
}

and for the Date format please refer below table.

Property: Description:
%a abbreviated weekday name (Sun, Mon, Tue)
%A full weekday name (Sunday, Monday, Tuesday)
%b abbreviated month name (Jan, Feb, Mar)
%B full month name (January, February, March)
%C century number (the year divided by 100 and truncated to an integer, range 00 to 99)
%d day of month (range 00 to 31)
%D same as “%m/%d/%y”
%e day of month, single digit (range 0 to 31)
%E number of days since unspecified epoch (integer, Date_Calc::dateToDays())
%H hour as decimal number (00 to 23)
%I hour as decimal number on 12-hour clock (01 to 12)
%j day of year (range 001 to 366)
%m month as decimal number (range 01 to 12)
%M minute as a decimal number (00 to 59)
%n newline character (\n)
%N month (1 to 12)
%O dst-corrected timezone offset expressed as “+/-HH:MM”
%o raw timezone offset expressed as “+/-HH:MM”
%p either ‘am’ or ‘pm’ depending on the time
%P either ‘AM’ or ‘PM’ depending on the time
%r time in am/pm notation, same as “%I:%M:%S %p”
%R time in 24-hour notation, same as “%H:%M”
%s seconds including the decimal representation smaller than one second
%S seconds as a decimal number (00 to 59)
%t tab character (\t)
%T current time, same as “%H:%M:%S”
%w weekday as decimal (0 = Sunday)
%U week number of current year, first sunday as first week
%y year as decimal (range 00 to 99)
%Y year as decimal including century (range 0000 to 9999)
%% literal ‘%’

In below snap you can check your date format.
date

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

3 thoughts on “Change date Format in TYPO3

  1. Pingback: How to set tt_news date in typo3 | Jainish senjaliya's Blog

  2. Pingback: How to set tt_news date language wise in typo3 | Jainish senjaliya's Blog

  3. Thanks. Helpful post.
    Just to make it more clear, for HTML5 rendering use:
    lib.stdheader.40.10.strftime = %e-%m-%y
    For classic HTML:
    lib.stdheader.5.strftime = %e-%m-%y

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s