Format$(Now, "YYYY") : Format « Data Type Functions « VBA / Excel / Access / Word






Format$(Now, "YYYY")

 

Sub FormatData()
   Debug.Print Format$(Now, "YYYY")
End Sub

 








Related examples in the same category

1.The Format function formats expressions in the style specified
2.Format$(Now, "Short Date")
3.Format$(Now, "DDDD")
4.Format$(Now, "DDD")
5.Format$(Now, "WW")
6.Format Phone number
7.Format Postal code
8.Illustrate the Format method