Method strptime()
- Method
strptime
mapping
(string
:int
) strptime(string(1..255)
data
,string(1..255)
format
)- Description
Parse the given
data
using the format informat
as a date.- %%
The % character.
- %a or %A
The weekday name according to the C locale, in abbreviated form or the full name.
- %b or %B or %h
The month name according to the C locale, in abbreviated form or the full name.
- %c
The date and time representation for the C locale.
- %C
The century number (0-99).
- %d or %e
The day of month (1-31).
- %D
Equivalent to %m/%d/%y.
- %H
The hour (0-23).
- %I
The hour on a 12-hour clock (1-12).
- %j
The day number in the year (1-366).
- %m
The month number (1-12).
- %M
The minute (0-59).
- %n
Arbitrary whitespace.
- %p
The C locale's equivalent of AM or PM.
- %R
Equivalent to %H:%M.
- %S
The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed).
- %t
Arbitrary whitespace.
- %T
Equivalent to %H:%M:%S.
- %U
The week number with Sunday the first day of the week (0-53).
- %w
The weekday number (0-6) with Sunday = 0.
- %W
The week number with Monday the first day of the week (0-53).
- %x
The date, using the C locale's date format.
- %X
The time, using the C locale's time format.
- %y
The year within century (0-99). When a century is not otherwise specified, values in the range 69-99 refer to years in the twentieth century (1969-1999); values in the range 00-68 refer to years in the twenty-first century (2000-2068).
- %Y
The year, including century (for example, 1991).
- See also