Determine the Month on a Specific Date in R Programming – months() Function Last Updated : 24 Jun, 2020 Improve Improve Like Article Like Save Share Report months() function in R Language is used to determine the month on a specific date passed to it as argument. Syntax: months(date, abbreviate) Parameters: date: Date to be checked abbreviate: Boolean value to abbreviate month Example 1: # R program to find the month # on a specific date # Specifying the date date <- as.POSIXlt("2020-06-23") date # Calling months() function months(date) Output: [1] "2020-06-23 UTC" [1] "June" Example 2: # R program to find the month # on a specific date # Specifying the date date <- as.POSIXlt("1994-01-17") date # Calling months() function months(date, abbreviate = TRUE) Output: [1] "1994-01-17 UTC" [1] "Jan" Like Article Suggest improvement Previous Explicit Coercion in R Programming Next Return an Object with the specified name in R Programming - get0() and mget() Function Share your thoughts in the comments Add Your Comment Please Login to comment...