Skip to content

Possible bug in parse_date_time or inconsistency #326

Description

@JasonAizkalns

Possible bug ? in parse_date_time -- see this SO post for more detail.

Long and short = why does the first method fail in light of the other methods working?

#### This fails ####
parse_date_time('4/18/1950 0130', '%m%d%Y %H%M')
# [1] NA
# Warning message:
# All formats failed to parse. No formats found.

#### But all of these work ####
parse_date_time('4/18/1950', '%m%d%Y')
# [1] "1950-04-18 UTC"

parse_date_time('4/18/1950 01', '%m%d%Y %H')
# [1] "1950-04-18 01:00:00 UTC"

parse_date_time('04/18/1950 0130', '%m%d%Y %H%M')
# [1] "1950-04-18 01:30:00 UTC"

parse_date_time('4/18/1950 01:30', '%m%d%Y %H%M')
# [1] "1950-04-18 01:30:00 UTC"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions