[
https://issues.apache.org/jira/browse/ARROW-15813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17513924#comment-17513924
]
Dragoș Moldovan-Grünfeld edited comment on ARROW-15813 at 3/29/22, 8:48 AM:
----------------------------------------------------------------------------
I was thinking we could try several formats and then choose the one that parses
successfully + then floor to the format that has been passed as an arg (i.e.
for {{strptime(..., format = "%Y-%m-%d %H")}} coalesce through variations of
{{"%H%M%S"}} with a variety of separators).
was (Author: dragosmg):
I was thinking we could try several formats and then choose the one that parses
successfully + then floor to the format that has been passed as an arg (i.e.
for {{strptime(..., format = "%Y-%m-%d %H:")}} coalesce through variations of
{{"%H%M%S"}} with a variety of separators).
> [R]strptime should support partial format
> -----------------------------------------
>
> Key: ARROW-15813
> URL: https://issues.apache.org/jira/browse/ARROW-15813
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Dragoș Moldovan-Grünfeld
> Priority: Major
>
> In base R we can use {{strptime}} to parse and extract parts from a datetime
> by passing a restricted format.
> {code:r}
> > strptime("2012-05-25 18:45:32", format = "%Y-%m-%d")
> [1] "2012-05-25 BST"
> > strptime("2012-05-25 18:45:32", format = "%Y-%m-%d %H")
> [1] "2012-05-25 18:00:00 BST
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)