VOOZH about

URL: https://www.geeksforgeeks.org/r-language/get-date-and-time-in-different-formats-in-r-programming-date-sys-date-sys-time-and-sys-timezone-function/

⇱ Get Date and Time in different Formats in R Programming - date(), Sys.Date(), Sys.time() and Sys.timezone() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Get Date and Time in different Formats in R Programming - date(), Sys.Date(), Sys.time() and Sys.timezone() Function

Last Updated : 15 Jul, 2025
date() function in R Language is used to return the current date and time.
Syntax: date() Parameters: Does not accept any parameters
Example: Output:
[1] "Thu Jun 11 04:29:39 2020"

Sys.Date() Function

Sys.Date() function is used to return the system's date.
Syntax: Sys.Date() Parameters: Does not accept any parameters
Example: Output:
[1] "2020-06-11"

Sys.time()

Sys.time() function is used to return the system's date and time.
Syntax: Sys.time() Parameters: Does not accept any parameters
Example: Output:
[1] "2020-06-11 05:35:49 UTC"

Sys.timezone()

Sys.timezone() function is used to return the current time zone.
Syntax: Sys.timezone() Parameters: Does not accept any parameters
Example: Output:
[1] "Etc/UTC"
Comment
Article Tags:

Explore