What's meaning of the “p” in the name datetime.datetime.strptime()? [duplicate]










0















This question already has an answer here:



  • What does the “p” in strptime stand for?

    4 answers



I'm learning the python's datetime module, and found two useful functions:
datetime.strptime() and datetime.strftime().



I know that the functions meaning, datetime.strftime() could convert a time object to a specified format string, I could understand the strftime as "string from time", the "f" means "from". But what's the meaning of the "p" in strptime()? I understand it's a function as "convert a string to a time object", so it should be strttime() instead of strptime().



Who else also feel confused on this function name?
Thanks in advance no matter you could answer this question or share the same confusion with me.










share|improve this question















marked as duplicate by coldspeed python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 13 '18 at 9:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • The p stands for "parse". Practically, it parses the string into a datetime object.
    – Tiberiu Zulean
    Nov 13 '18 at 9:43










  • The "f" in strftime actually comes from "format".
    – chthonicdaemon
    Nov 13 '18 at 9:56










  • This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
    – Clock ZHONG
    Nov 14 '18 at 1:14
















0















This question already has an answer here:



  • What does the “p” in strptime stand for?

    4 answers



I'm learning the python's datetime module, and found two useful functions:
datetime.strptime() and datetime.strftime().



I know that the functions meaning, datetime.strftime() could convert a time object to a specified format string, I could understand the strftime as "string from time", the "f" means "from". But what's the meaning of the "p" in strptime()? I understand it's a function as "convert a string to a time object", so it should be strttime() instead of strptime().



Who else also feel confused on this function name?
Thanks in advance no matter you could answer this question or share the same confusion with me.










share|improve this question















marked as duplicate by coldspeed python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 13 '18 at 9:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • The p stands for "parse". Practically, it parses the string into a datetime object.
    – Tiberiu Zulean
    Nov 13 '18 at 9:43










  • The "f" in strftime actually comes from "format".
    – chthonicdaemon
    Nov 13 '18 at 9:56










  • This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
    – Clock ZHONG
    Nov 14 '18 at 1:14














0












0








0








This question already has an answer here:



  • What does the “p” in strptime stand for?

    4 answers



I'm learning the python's datetime module, and found two useful functions:
datetime.strptime() and datetime.strftime().



I know that the functions meaning, datetime.strftime() could convert a time object to a specified format string, I could understand the strftime as "string from time", the "f" means "from". But what's the meaning of the "p" in strptime()? I understand it's a function as "convert a string to a time object", so it should be strttime() instead of strptime().



Who else also feel confused on this function name?
Thanks in advance no matter you could answer this question or share the same confusion with me.










share|improve this question
















This question already has an answer here:



  • What does the “p” in strptime stand for?

    4 answers



I'm learning the python's datetime module, and found two useful functions:
datetime.strptime() and datetime.strftime().



I know that the functions meaning, datetime.strftime() could convert a time object to a specified format string, I could understand the strftime as "string from time", the "f" means "from". But what's the meaning of the "p" in strptime()? I understand it's a function as "convert a string to a time object", so it should be strttime() instead of strptime().



Who else also feel confused on this function name?
Thanks in advance no matter you could answer this question or share the same confusion with me.





This question already has an answer here:



  • What does the “p” in strptime stand for?

    4 answers







python datetime






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 9:57









martineau

66.2k989178




66.2k989178










asked Nov 13 '18 at 9:35









Clock ZHONGClock ZHONG

386313




386313




marked as duplicate by coldspeed python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 13 '18 at 9:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by coldspeed python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 13 '18 at 9:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • The p stands for "parse". Practically, it parses the string into a datetime object.
    – Tiberiu Zulean
    Nov 13 '18 at 9:43










  • The "f" in strftime actually comes from "format".
    – chthonicdaemon
    Nov 13 '18 at 9:56










  • This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
    – Clock ZHONG
    Nov 14 '18 at 1:14

















  • The p stands for "parse". Practically, it parses the string into a datetime object.
    – Tiberiu Zulean
    Nov 13 '18 at 9:43










  • The "f" in strftime actually comes from "format".
    – chthonicdaemon
    Nov 13 '18 at 9:56










  • This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
    – Clock ZHONG
    Nov 14 '18 at 1:14
















The p stands for "parse". Practically, it parses the string into a datetime object.
– Tiberiu Zulean
Nov 13 '18 at 9:43




The p stands for "parse". Practically, it parses the string into a datetime object.
– Tiberiu Zulean
Nov 13 '18 at 9:43












The "f" in strftime actually comes from "format".
– chthonicdaemon
Nov 13 '18 at 9:56




The "f" in strftime actually comes from "format".
– chthonicdaemon
Nov 13 '18 at 9:56












This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
– Clock ZHONG
Nov 14 '18 at 1:14





This question is really asked by others. And let me list the possible answers here: 1. Pointer(time object pointer), 2. Parser(String's parser to a time object), 3. Posix(return a posix time object), 4. Put( put a string represented time to a time object)
– Clock ZHONG
Nov 14 '18 at 1:14













1 Answer
1






active

oldest

votes


















1














These are the developer doc string says. I guess p stands for parsing datetime from a string type.



In [2]: datetime.datetime.strptime??
Docstring: string, format -> new datetime parsed from a string (like time.strptime()).
Type: builtin_function_or_method

In [3]: datetime.datetime.strftime??
Docstring: format -> strftime() style string.
Type: method_descriptor





share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    These are the developer doc string says. I guess p stands for parsing datetime from a string type.



    In [2]: datetime.datetime.strptime??
    Docstring: string, format -> new datetime parsed from a string (like time.strptime()).
    Type: builtin_function_or_method

    In [3]: datetime.datetime.strftime??
    Docstring: format -> strftime() style string.
    Type: method_descriptor





    share|improve this answer



























      1














      These are the developer doc string says. I guess p stands for parsing datetime from a string type.



      In [2]: datetime.datetime.strptime??
      Docstring: string, format -> new datetime parsed from a string (like time.strptime()).
      Type: builtin_function_or_method

      In [3]: datetime.datetime.strftime??
      Docstring: format -> strftime() style string.
      Type: method_descriptor





      share|improve this answer

























        1












        1








        1






        These are the developer doc string says. I guess p stands for parsing datetime from a string type.



        In [2]: datetime.datetime.strptime??
        Docstring: string, format -> new datetime parsed from a string (like time.strptime()).
        Type: builtin_function_or_method

        In [3]: datetime.datetime.strftime??
        Docstring: format -> strftime() style string.
        Type: method_descriptor





        share|improve this answer














        These are the developer doc string says. I guess p stands for parsing datetime from a string type.



        In [2]: datetime.datetime.strptime??
        Docstring: string, format -> new datetime parsed from a string (like time.strptime()).
        Type: builtin_function_or_method

        In [3]: datetime.datetime.strftime??
        Docstring: format -> strftime() style string.
        Type: method_descriptor






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 13 '18 at 9:44









        Tiberiu Zulean

        14713




        14713










        answered Nov 13 '18 at 9:38









        Rahul K PRahul K P

        7,16122033




        7,16122033













            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            天下統一