How to transform an English standard date into a Brazilian standard date in R?

Asked

Viewed 150 times

4

Suppose I have a date in the standard English format year-month-day (ymd):

data = Sys.Date()

print(data)
[1] "2019-12-03"

But I really need this date to be in the Brazilian standard day/month/year format:

print(data_BR)

[1] "03/12/2019"

How can I turn my English standard date into a Brazilian standard date on R?

1 answer

3


You can use formatting.

format(Sys.Date(), "%d/%m/%Y")

Source

  • 2

    Thanks for the reply, had already used the function format, but I used it wrong. But now it worked perfectly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.