Be the first user to complete this post

  • 0
Add to List

VBA-Excel: Date-Time Functions – Day()

Description:

The Day function takes date as a parameter and returns a number between 1 and 31, that is the day of the month.

Format:

Day(strDate)

Arguments:
  • strDate
    • Manda­tory
    • Type: Date
    • Date, whose day needs to be calculated.

Example:

Function FnDay()

   Dim strDate

   strDate = CDate("15-July-2013")    

   MsgBox "Day of " & strDate & " is -> " & Day(strDate)

End Function
DAY()
DAY()



Also Read:

  1. VBA-Excel: Date-Time Functions – DatePart()
  2. VBA-Excel : 3D-Ranges - Working with Multiple WorkSheets At The Simultaneously
  3. VBA-Excel: Array Functions – Filter()
  4. VBA-Excel: Date-Time Functions - Timer()
  5. VBA-Excel: Arrays – One Dimension, Dynamic Array
  6. VBA-Excel: Date-Time Functions – FormatDateTime()
  7. VBA-Excel: Select and Activate Cells - Select
  8. VBA-Excel: String Functions – Replace()