date() function in R Language is used to return the current date and time.
Syntax: date()
Parameters:
Does not accept any parameters
Example:
# R program to illustrate # date function # Calling date() function to # return current date and time date() |
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:
# R program to illustrate # Sys.Date function # Calling Sys.Date() function to # return the system's date Sys.Date() |
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:
# R program to illustrate # Sys.time function # Calling Sys.time() function to # return the system's date and time Sys.time() |
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:
# R program to illustrate # Sys.timezone function # Calling Sys.timezone() function to # return the current time zone Sys.timezone() |
Output:
[1] "Etc/UTC"
Recommended Posts:
- Convert a String into Date Format in R Programming - as.Date() Function
- Parsing Date and Time in R Programming - strptime() Function
- Getting String Representation of the given Date and Time Object in R Programming - strftime() Function
- Get the List of Arguments of a Function in R Programming - args() Function
- Performing different Operations on Two Arrays in R Programming - outer() Function
- Getting class of different data types in R Programming - class() Function
- Getting type of different data types in R Programming - typeof() Function
- Determine the Weekday on a Specific Date in R Programming - weekdays() Function
- Determine the Month on a Specific Date in R Programming - months() Function
- Determine the Quarter in which the Specific Date lies in R Programming - quarters() Function
- Search and Return an Object with the specified name in R Programming - get() Function
- Get the Minimum and Maximum element of a Vector in R Programming - range() Function
- Get a List of points obtained by Interpolation in R Programming - spline() and splinefun() Function
- Get Exclusive Elements between Two Objects in R Programming - setdiff() Function
- Get or Set Levels of a Factor in R Programming - levels() Function
- Get or Set Dimensions of a Matrix in R Programming - dim() Function
- Get Indices of Specified Values of an Array in R Programming - arrayInd() Function
- Get the number of columns of an Object in R Programming - ncol() Function
- Get the number of rows of an Object in R Programming - nrow() Function
- Get Transpose of a Matrix or Data Frame in R Programming - t() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

