logo

Checking the Current Date and Time in R 📂R

Checking the Current Date and Time in R

Code

Not only in R but in many tasks that require the use of programming languages, it’s necessary to write logs and to have information about the time at which they were written. In R, you can check the date with the Sys.Date() function, and you can know the accurate time down to seconds with the Sys.time() function. Be careful with the case sensitivity, and if you don’t need the date, you can split the string to only obtain information about the time.

20190403\_104523.png