Hi,
I have data file which generated by an otherwise very nice (diabetes
log) app, but exports dates really silly.
After reading the enclosed mwe.csv into R like so
MWE <- read_delim('mwe.csv', delim = ';') %>%
select(Date) %>%
print()
this comes out as:
# A tibble: 2 ? 1
Date
<chr>
1 9. Jul 2022 at 11:39
2 10. Jul 2022 at 01:58
No matter what I try I am not able to parse this inside R to get at
proper dates (I have loaded tidyverse and lubridate).
I can easily do somethig
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'SELECT Date as oridate,
DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
FROM mwe'
+-----------------------+------------------+
| oridate | date |
+-----------------------+------------------+
| 9. Jul 2022 at 11:39 | 2022-07-09 11:07 |
| 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
+-----------------------+------------------+
and hence could easily do something like
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'ALTER mwe
SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
but would rather like to be able to do it inside R and would therefor
appreciate any advice in this regard.
greetings, el
? Wed, 13 Jul 2022 15:40:43 +0200
Dr Eberhard Lisse <nospam at lisse.NA> ?????:
1 9. Jul 2022 at 11:39
2 10. Jul 2022 at 01:58
Don't know about lubridate, but the following seems to work:
Sys.setlocale('LC_TIME', 'C')
strptime(
c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'),
'%d. %b %Y at %H:%M'
)
(Use Sys.getlocale() and on.exit() to restore the previous locale
state if you need it.)
Does this do the trick?
s = c("9. Jul 2022 at 11:39", "10. Jul 2022 at 01:58")
as.POSIXct(s, format = "%d. %b %Y at %H:%M")
as.POSIXct(s, format = "%d. %b %Y at %H:%M", tz = "UTC")
On Wed, Jul 13, 2022 at 9:41 AM Dr Eberhard Lisse <nospam at lisse.na> wrote:
Hi,
I have data file which generated by an otherwise very nice (diabetes
log) app, but exports dates really silly.
After reading the enclosed mwe.csv into R like so
MWE <- read_delim('mwe.csv', delim = ';') %>%
select(Date) %>%
print()
this comes out as:
# A tibble: 2 ? 1
Date
<chr>
1 9. Jul 2022 at 11:39
2 10. Jul 2022 at 01:58
No matter what I try I am not able to parse this inside R to get at
proper dates (I have loaded tidyverse and lubridate).
I can easily do somethig
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'SELECT Date as oridate,
DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
FROM mwe'
+-----------------------+------------------+
| oridate | date |
+-----------------------+------------------+
| 9. Jul 2022 at 11:39 | 2022-07-09 11:07 |
| 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
+-----------------------+------------------+
and hence could easily do something like
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'ALTER mwe
SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
but would rather like to be able to do it inside R and would therefor
appreciate any advice in this regard.
greetings, el
--
To email me replace 'nospam' with 'el'
Hello,
With lubridate, note in what sequence your datetime elements occur and
use the appropriate function.
d <- c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58')
lubridate::dmy_hm(d)
#> [1] "2022-07-09 11:39:00 UTC" "2022-07-10 01:58:00 UTC"
Hope this helps,
Rui Barradas
?s 14:40 de 13/07/2022, Dr Eberhard Lisse escreveu:
Hi,
I have data file which generated by an otherwise very nice (diabetes
log) app, but exports dates really silly.
After reading the enclosed mwe.csv into R like so
???? MWE <- read_delim('mwe.csv', delim = ';') %>%
??????? select(Date) %>%
??????? print()
this comes out as:
???? # A tibble: 2 ? 1
????Date
????<chr>
???? 1 9. Jul 2022 at 11:39
???? 2 10. Jul 2022 at 01:58
No matter what I try I am not able to parse this inside R to get at
proper dates (I have loaded tidyverse and lubridate).
I can easily do somethig
???? csvq? -d ';' -t '%e. %b %Y at %H:%i' \
??????? 'SELECT Date as oridate,
??????????? DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
??????? FROM mwe'
???? +-----------------------+------------------+
???? |??????? oridate??????? |?????? date?????? |
???? +-----------------------+------------------+
???? | 9. Jul 2022 at 11:39? | 2022-07-09 11:07 |
???? | 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
???? +-----------------------+------------------+
and hence could easily do something like
???? csvq? -d ';' -t '%e. %b %Y at %H:%i' \
????? 'ALTER mwe
????? SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
but would rather like to be able to do it inside R and would therefor
appreciate any advice in this regard.
greetings, el
Hi,
while all of the below work in a character vector, none works in
the tibble.
The following
DDATA %>%
add_column(as.tibble(lubridate::dmy_hm(DDATA$Date)),
.before = "Period") %>%
rename(NewDate=value) %>%
select(Date,NewDate) %>%
filter(between(as.Date(NewDate),as.Date('2022-07-09'),
as.Date('2022-07-10')))
does work
# A tibble: 3 ? 2
Date NewDate
<chr> <dttm>
1 9. Jul 2022 at 11:39 2022-07-09 11:39:00
2 10. Jul 2022 at 01:58 2022-07-10 01:58:00
3 10. Jul 2022 at 11:26 2022-07-10 11:26:00
but I wonder if that can not be done more elegantly, ie by direct
replacements in the column.
greetings, el
On 2022-07-13 16:48 , Rui Barradas wrote:
[...]
> d <- c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58')
> lubridate::dmy_hm(d)
> #> [1] "2022-07-09 11:39:00 UTC" "2022-07-10 01:58:00 UTC"
[...]
On 2022-07-13 16:03 , Ben Tupper wrote:
[...]
> s = c("9. Jul 2022 at 11:39", "10. Jul 2022 at 01:58")
> as.POSIXct(s, format = "%d. %b %Y at %H:%M")
> as.POSIXct(s, format = "%d. %b %Y at %H:%M", tz = "UTC")
[...]
On 2022-07-13 15:52 , Ivan Krylov wrote:
[...]
> Sys.setlocale('LC_TIME', 'C')
> strptime(
> c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'),
> '%d. %b %Y at %H:%M'
> )
[...]
> ?s 14:40 de 13/07/2022, Dr Eberhard Lisse escreveu:
>>
>> Hi,
>>
>> I have data file which generated by an otherwise very nice (diabetes
>> log) app, but exports dates really silly.
>>
>> After reading the enclosed mwe.csv into R like so
>>
>> MWE <- read_delim('mwe.csv', delim = ';') %>%
>> select(Date) %>%
>> print()
>>
>>
>> this comes out as:
>>
>> # A tibble: 2 ? 1
>> Date
>> <chr>
>> 1 9. Jul 2022 at 11:39
>> 2 10. Jul 2022 at 01:58
>>
>>
>> No matter what I try I am not able to parse this inside R to get at
>> proper dates (I have loaded tidyverse and lubridate).
>>
>> I can easily do somethig
>>
>> csvq -d ';' -t '%e. %b %Y at %H:%i' \
>> 'SELECT Date as oridate,
>> DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
>> FROM mwe'
>>
>> +-----------------------+------------------+
>> | oridate | date |
>> +-----------------------+------------------+
>> | 9. Jul 2022 at 11:39 | 2022-07-09 11:07 |
>> | 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
>> +-----------------------+------------------+
>>
>> and hence could easily do something like
>>
>> csvq -d ';' -t '%e. %b %Y at %H:%i' \
>> 'ALTER mwe
>> SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
>>
>> but would rather like to be able to do it inside R and would therefor
>> appreciate any advice in this regard.
>>
>>
>> greetings, el
>>
>
Eberhard,
Others have supplied ways to do this using various date management functions. But I want to add another option that may make sense if the dates are not all quite as predictable.
You can use your own regular expressions in R as in most languages, that try to match each entry to one or more patterns you supply. When it matches a pattern, you can capture various bits of what you find and recombine them into any valid date format you want or convert them into some date type.
You just showed two pseudo-date-time entries:
1 9. Jul 2022 at 11:39
2 10. Jul 2022 at 01:58
It looks like the first item in each is a sequence number that can be ignored. But I assume after the ninth, it takes up ever more space as it becomes 10 then 100 and so on. It would thus be of varying width. So, in English, you are looking for a pattern like:
- beginning of the line/entry
- one or more digits in 0-9 followed by what looks like a space, but maybe arbitrary whitespace.
- capture one or two more digits if followed by a period, but not the period.
- capture what looks like a three-letter character string representing a month as a "word" but not what follows.
- whitespace followed by "at" followed by more whitespace can be ignored but must be present.
- capture a two digit number perhaps including the colon and another two-digit number, or two parts without the colon.
- match the end of the entry
If it looks like the above, and you captured the parts needed, you can reconstitute the parts, albeit perhaps first checking to see if the month names are valid (which can be handled by a pattern part that looks like "(Jan|Feb|...|Dec)" and of course making sure the other parts also fit requirements such as days as integers being between 1 and 31 and similar issues about time. My guess is that you don't really want to validate that deeply, let alone do the validation within the regular expression.
But when your data ends up having multiple ways of saying the date that you can enumerate and tell apart, this can be a way to parse them and identify what it matches and so on.
In the above case, full regular expressions may be overkill nd regular string functions might suffice. There are many ways, including something as simple as this:
dt <- "1 9. Jul 2022 at 11:39"
dt_parts <- strsplit(dt, " ")
Unfortunately, this returns a vector of parts with a decimal point still in place:
dt_parts
[1] "1" "9." "Jul" "2022" "at" "11:39"
You can now ignore the parts in the first fifth positions as the sequence number and "at" are meaningless and use these:
the_day <- dt_parts[2]
the_month <- dt_parts[3]
the_year <- dt_parts[4]
the_time <- dt_parts[6]
Of course, you now may want further processing using one of many ways to turn something like "9." (note there may be a "12." too) or even make it an integer instead of a character string. You may want to change the dates into numerals with something like this:
month_conversion <- list("Jan"="01", Feb="02", Mar="03", Apr="04", May="05", Jun="06",
Jul="07", Aug="08", Sep="09", Oct="10", Nov="11", Dec="12")
month_numeric_string <- month_conversion[the_month]
My point is that if your format is consistent, you can pick out the parts you want as strings or make them decimals or whatever you need and use string functions, such as paste0() to recombine them into the format you want.
Of course if you can tell some date-related function how to do it for you, that is obviously simpler and better for you.
And, obviously, it would be even nicer if you could get them to not give dates in this format!
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Rui Barradas
Sent: Wednesday, July 13, 2022 10:48 AM
To: Dr Eberhard Lisse <nospam at lisse.NA>; r-help at r-project.org
Subject: Re: [R] How to parse a really silly date with lubridate
Hello,
With lubridate, note in what sequence your datetime elements occur and use the appropriate function.
d <- c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58')
lubridate::dmy_hm(d)
#> [1] "2022-07-09 11:39:00 UTC" "2022-07-10 01:58:00 UTC"
Hope this helps,
Rui Barradas
?s 14:40 de 13/07/2022, Dr Eberhard Lisse escreveu:
Hi,
I have data file which generated by an otherwise very nice (diabetes
log) app, but exports dates really silly.
After reading the enclosed mwe.csv into R like so
MWE <- read_delim('mwe.csv', delim = ';') %>%
select(Date) %>%
print()
this comes out as:
# A tibble: 2 ? 1
Date
<chr>
1 9. Jul 2022 at 11:39
2 10. Jul 2022 at 01:58
No matter what I try I am not able to parse this inside R to get at
proper dates (I have loaded tidyverse and lubridate).
I can easily do somethig
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'SELECT Date as oridate,
DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
FROM mwe'
+-----------------------+------------------+
| oridate | date |
+-----------------------+------------------+
| 9. Jul 2022 at 11:39 | 2022-07-09 11:07 |
| 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
+-----------------------+------------------+
and hence could easily do something like
csvq -d ';' -t '%e. %b %Y at %H:%i' \
'ALTER mwe
SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
but would rather like to be able to do it inside R and would therefor
appreciate any advice in this regard.
greetings, el
Hello,
Are you looking for mutate? In the example below I haven't included the
filter, since the tibble only has 2 rows. But the date column is coerced
to an actual datetime class in place, without the need for NewDate.
suppressPackageStartupMessages({
library(tibble)
library(dplyr)
})
DDATA <- tibble(Date = c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'))
DDATA %>%
mutate(Date = lubridate::dmy_hm(Date))
#> # A tibble: 2 ? 1
#> Date
#> <dttm>
#> 1 2022-07-09 11:39:00
#> 2 2022-07-10 01:58:00
Hope this helps,
Rui Barradas
?s 17:14 de 13/07/2022, Dr Eberhard W Lisse escreveu:
Hi,
while all of the below work in a character vector, none works in
the tibble.
The following
????DDATA %>%
??????? add_column(as.tibble(lubridate::dmy_hm(DDATA$Date)),
??????????? .before = "Period") %>%
??????? rename(NewDate=value) %>%
??????? select(Date,NewDate) %>%
??????? filter(between(as.Date(NewDate),as.Date('2022-07-09'),
??????????? as.Date('2022-07-10')))
does work
????# A tibble: 3 ? 2
????? Date????????????????? NewDate
????? <chr>???????????????? <dttm>
????1 9. Jul 2022 at 11:39? 2022-07-09 11:39:00
????2 10. Jul 2022 at 01:58 2022-07-10 01:58:00
????3 10. Jul 2022 at 11:26 2022-07-10 11:26:00
but I wonder if that can not be done more elegantly, ie by direct
replacements in the column.
greetings, el
On 2022-07-13 16:48 , Rui Barradas wrote:
[...]
> d <- c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58')
> lubridate::dmy_hm(d)
> #> [1] "2022-07-09 11:39:00 UTC" "2022-07-10 01:58:00 UTC"
[...]
On 2022-07-13 16:03 , Ben Tupper wrote:
[...]
> s = c("9. Jul 2022 at 11:39", "10. Jul 2022 at 01:58")
> as.POSIXct(s, format = "%d. %b %Y at %H:%M")
> as.POSIXct(s, format = "%d. %b %Y at %H:%M", tz = "UTC")
[...]
On 2022-07-13 15:52 , Ivan Krylov wrote:
[...]
> Sys.setlocale('LC_TIME', 'C')
> strptime(
>?? c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'),
>?? '%d. %b %Y at %H:%M'
> )
[...]
> ?s 14:40 de 13/07/2022, Dr Eberhard Lisse escreveu:
>>
>> Hi,
>>
>> I have data file which generated by an otherwise very nice (diabetes
>> log) app, but exports dates really silly.
>>
>> After reading the enclosed mwe.csv into R like so
>>
>>?????? MWE <- read_delim('mwe.csv', delim = ';') %>%
>>????????? select(Date) %>%
>>????????? print()
>>
>>
>> this comes out as:
>>
>>?????? # A tibble: 2 ? 1
>>????? Date
>>????? <chr>
>>?????? 1 9. Jul 2022 at 11:39
>>?????? 2 10. Jul 2022 at 01:58
>>
>>
>> No matter what I try I am not able to parse this inside R to get at
>> proper dates (I have loaded tidyverse and lubridate).
>>
>> I can easily do somethig
>>
>>?????? csvq? -d ';' -t '%e. %b %Y at %H:%i' \
>>????????? 'SELECT Date as oridate,
>>????????????? DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m") AS date
>>????????? FROM mwe'
>>
>>?????? +-----------------------+------------------+
>>?????? |??????? oridate??????? |?????? date?????? |
>>?????? +-----------------------+------------------+
>>?????? | 9. Jul 2022 at 11:39? | 2022-07-09 11:07 |
>>?????? | 10. Jul 2022 at 01:58 | 2022-07-10 01:07 |
>>?????? +-----------------------+------------------+
>>
>> and hence could easily do something like
>>
>>?????? csvq? -d ';' -t '%e. %b %Y at %H:%i' \
>>??????? 'ALTER mwe
>>??????? SET Date = DATETIME_FORMAT(Date, "%Y-%m-%d %H:%m")'
>>
>> but would rather like to be able to do it inside R and would therefor
>> appreciate any advice in this regard.
>>
>>
>> greetings, el
>>
Bui,
thanks, this what Avi suggested in an email to me as well and works.
It's so easy if you know it :-)-O
el
On 2022-07-13 23:40 , Rui Barradas wrote:
Hello,
Are you looking for mutate? In the example below I haven't included the
filter, since the tibble only has 2 rows. But the date column is coerced
to an actual datetime class in place, without the need for NewDate.
suppressPackageStartupMessages({
? library(tibble)
? library(dplyr)
})
DDATA <- tibble(Date = c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'))
DDATA %>%
? mutate(Date = lubridate::dmy_hm(Date))
#> # A tibble: 2 ? 1
#>?? Date
#>?? <dttm>
#> 1 2022-07-09 11:39:00
#> 2 2022-07-10 01:58:00
Hope this helps,
Rui Barradas
To be clear, I take no credit for the rather extraordinary function cll shown below:
mutate(Date = lubridate::dmy_hm(Date))
I would pretty much never have constructed such an interesting and rather unnecessary line of code.
ALL the work is done within the parentheses:
Date = lubridate::dmy_hm(Date))
The above creates a tibble and assigns it to the name of Date. but first it takes a vector called Date containing text and uses a function to parse it and return a form more suitable to use as a date.
So what does mutate() do when it is called with a tibble and asked to do nothing? I mean it sees something more like this:
Mutate(.data=Date)
What is missing are the usual assignment statements to modify existing columns or make new ones. So it does nothing and exists without complaint.
My suggestion was more like the following which uses mutate. For illustration, I will not use the name "Date" repeatedly and make new columns and uses an original_date as the source but note I am not saying the lubridate used will work as I do not see how it handles the initial part of the string containing an index number.
old_tibble <- tibble(useless=original_date)
new_tibble <- mutate(old_tibble, useful = lubridate::dmy_hm(Date))
The above can be more compact by making the tibble directly in the first argument, and it can be done using old or new pipelines.
The reason the suggested way worked is because it used the vectorized methods of base-R and I mentioned there was no reason you must use dplyr for this or many other things especially when it is simple.
Now if you wanted to make multiple new columns containing character or integer versions of the month and other parts of the date or even calculate what day of the week that full date was in that year, then mutate can be very useful as you can keep adding requests to make a new column using all old and new columns already specified.
Sometimes when code works, we don't look to see if it works inadvertently, LOL!
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Dr Eberhard W Lisse
Sent: Wednesday, July 13, 2022 5:49 PM
To: r-help at r-project.org
Subject: Re: [R] How to parse a really silly date with lubridate
Bui,
thanks, this what Avi suggested in an email to me as well and works.
It's so easy if you know it :-)-O
el
On 2022-07-13 23:40 , Rui Barradas wrote:
Hello,
Are you looking for mutate? In the example below I haven't included
the filter, since the tibble only has 2 rows. But the date column is
coerced to an actual datetime class in place, without the need for NewDate.
suppressPackageStartupMessages({
library(tibble)
library(dplyr)
})
DDATA <- tibble(Date = c('9. Jul 2022 at 11:39', '10. Jul 2022 at
01:58'))
DDATA %>%
mutate(Date = lubridate::dmy_hm(Date)) #> # A tibble: 2 ? 1 #>
Date #> <dttm> #> 1 2022-07-09 11:39:00 #> 2 2022-07-10 01:58:00
Hope this helps,
Rui Barradas
Let me retract and modify my earlier comment based on getting more complete code.
This line of code remains silly if used stand-alone,
mutate(Date = lubridate::dmy_hm(Date))
But it was used in a pipeline as in
Read_delim(...) %>%
mutate(Date = lubridate::dmy_hm(Date)) %>%
...
As such, it makes perfect sense ONCE GIVEN A CONTEXT.
The contents of a file are read into a data.frame which is the implicit first argument to mutate. There is this a second argument that does an appropriate conversion to the column named Date within the data.frame.
Date = lubridate::dmy_hm(Date)
So it is n appropriate use and highlights one reason some do not like pipelines. When using one, you need to KNOW it so you are aware any arguments are after a first argument not shown.
-----Original Message-----
From: avi.e.gross at gmail.com <avi.e.gross at gmail.com>
Sent: Thursday, July 14, 2022 12:43 PM
To: 'r-help at r-project.org' <r-help at r-project.org>
Subject: RE: [R] How to parse a really silly date with lubridate
To be clear, I take no credit for the rather extraordinary function cll shown below:
mutate(Date = lubridate::dmy_hm(Date))
I would pretty much never have constructed such an interesting and rather unnecessary line of code.
ALL the work is done within the parentheses:
Date = lubridate::dmy_hm(Date))
The above creates a tibble and assigns it to the name of Date. but first it takes a vector called Date containing text and uses a function to parse it and return a form more suitable to use as a date.
So what does mutate() do when it is called with a tibble and asked to do nothing? I mean it sees something more like this:
Mutate(.data=Date)
What is missing are the usual assignment statements to modify existing columns or make new ones. So it does nothing and exists without complaint.
My suggestion was more like the following which uses mutate. For illustration, I will not use the name "Date" repeatedly and make new columns and uses an original_date as the source but note I am not saying the lubridate used will work as I do not see how it handles the initial part of the string containing an index number.
old_tibble <- tibble(useless=original_date) new_tibble <- mutate(old_tibble, useful = lubridate::dmy_hm(Date))
The above can be more compact by making the tibble directly in the first argument, and it can be done using old or new pipelines.
The reason the suggested way worked is because it used the vectorized methods of base-R and I mentioned there was no reason you must use dplyr for this or many other things especially when it is simple.
Now if you wanted to make multiple new columns containing character or integer versions of the month and other parts of the date or even calculate what day of the week that full date was in that year, then mutate can be very useful as you can keep adding requests to make a new column using all old and new columns already specified.
Sometimes when code works, we don't look to see if it works inadvertently, LOL!
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Dr Eberhard W Lisse
Sent: Wednesday, July 13, 2022 5:49 PM
To: r-help at r-project.org
Subject: Re: [R] How to parse a really silly date with lubridate
Bui,
thanks, this what Avi suggested in an email to me as well and works.
It's so easy if you know it :-)-O
el
On 2022-07-13 23:40 , Rui Barradas wrote:
Hello,
Are you looking for mutate? In the example below I haven't included
the filter, since the tibble only has 2 rows. But the date column is
coerced to an actual datetime class in place, without the need for NewDate.
suppressPackageStartupMessages({
library(tibble)
library(dplyr)
})
DDATA <- tibble(Date = c('9. Jul 2022 at 11:39', '10. Jul 2022 at
01:58'))
DDATA %>%
mutate(Date = lubridate::dmy_hm(Date)) #> # A tibble: 2 ? 1 #> Date
#> <dttm> #> 1 2022-07-09 11:39:00 #> 2 2022-07-10 01:58:00
Hope this helps,
Rui Barradas