Python time strftime() Method. After may be the syntax for strftime() method

Python time strftime() Method. After may be the syntax for strftime() method

Description

Pythom time technique strftime() converts a tuple or struct_time representing a period as returned by gmtime() or localtime() to a sequence as specified by the argument that is format.

If t is certainly not supplied, the present time as came back by localtime() is employed. structure must certanly be a string. An exception ValueError is raised if any industry in t is not in the permitted range.

Syntax

Parameters

T в€’ This is the right amount of time in amount of moments to be formatted.

format в€’ This is basically the directive which may be employed to format offered time. Listed here directives can be embedded into the format string в€’

Directive

%a – abbreviated weekday title

%A – complete weekday title

%b – abbreviated thirty days title

%B – complete thirty days title

%c – preferred time and date representation

%C – century quantity (the divided by 100, range 00 to 99 year)

%d – of the month (01 to 31 day)

%e – of the month (1 to 31 day)

%g – like %G, but without having the century

%G – 4-digit year corresponding to the ISO week quantity (see %V).

%H – hour, making use of a clock that is 24-hour00 to 23)

%we – hour, making use of a 12-hour clock (01 to 12)

per centj – of the year (001 to 366 day)

%m – thirty days (01 to 12)

%n – newline character

%p – either am or pm according to the offered time value

%r – time in a.m. and p.m. notation

per centR – amount of time in 24 hour notation

%t – tab character

%T – present time, corresponding to %H:%M:%S

%u – weekday as lots (1 to 7), Monday=1. Warning: In Sun Solaris Sunday=1

%U – week wide range of the present 12 months, you start with the very first Sunday due to the fact very first time of this week that is first

%V – The ISO 8601 week amount of the year that is current01 to 53), where week 1 may be the very first week that includes at the least 4 times in today’s 12 months, sufficient reason for Monday whilst the very first time associated with the week

%W – week amount of the present year, you start with the initial Monday whilst the very first time regarding the week that is first

%w – of the week as a decimal, Sunday=0 day

%x – preferred date representation without having the time

%X – favored time representation minus the date

%y – without a century (range 00 to 99 year)

%Y – year like the century

percentZ or %z – time area or title or abbreviation

per cent% – a literal % character

Return Value

This technique will not get back any value.

Instance

The after instance shows the use of strftime() technique.

It produces following result в€’ when we run above program,

SoulSingles.com Provides Its Users An Opportunity To Win A Fantasy Date With NBA And WNBA Stars Brendan Haywood And Alana Beard

Share Article

SoulSingles.com Has Its Members The Opportunity To Win A Fantasy Date With NBA And WNBA Stars Brendan Haywood And Alana Beard

Potomac, MD (PRWEB) November 3, 2005

World Singles, LLC, a leading provider of online personals internet sites for cultural communities, today announced it’s going to provide people of its African-American website, SoulSingles.com, an opportunity to win an paid that is all-expense date with NBA and WNBA Stars Brendan Haywood of this Washington Wizards and Alana Beard for the Washington Mystics.

Brendan Haywood and Alana Beard will search through lots and lots of SoulSingles.com user pages hunting for probably the most complete, imaginative and interesting male and female pages.

“We feel lucky to truly have the opportunity to use Brendan and Alana. Not just have actually they fast become probably the most talents that are promising the NBA and WNBA, these are generally great individuals. It’ll be a real treat for our people to access understand them,” said Idan Ravin, Chief working Officer for World Singles.

About Brendan Haywood:

Brendan Haywood regarding the Washington Wizards happens to be one of several premier players that are low-post the NBA. After a stellar university job during the University of new york where he had been a preseason prospect when it comes to Naismith Award in addition to Wooden Award, in addition to an associate for the ESPN All-American group, Brendan had been chosen into the very first round associated with 2001 NBA Draft. Brendan has worked excessively difficult the final several years to be one of many better big males when you look at the NBA. In 2005, alongside Gilbert Arenas, Antawn Jamison and Larry Hughes, Brendan aided lead the Wizards for their playoff that is first series in numerous years.

About Alana Beard:

Alana Beard is the best referred to as slashing shooting guard for the Washington Mystics whom in 2010 had been chosen for the 2005 WNBA All-Star Game. During her rookie season in 2004, she led the Mystics towards the playoffs inspite of the lack of some key players for all of the period. She ended up being the next pick that is overall the WNBA Draft after completing a stellar career at Duke where she led her team to two appearances into the Final Four. Alana is widely considered among the college players that are best in present history. She ended up being a three time Atlantic Coast Conference Player regarding the from 2002 to 2004 year. Her number 20 jersey was retired by the University when she left Duke. She had been a three time First Team AP All US plus in 2004 she won the Wooden that is first Award a women’s basketball player and had been the 2004 College Player of the season. Alana graduated from Duke on May 9th, 2004 with a diploma in sociology.