|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请参考
当前日期是本年的第几天?
Function Yday(riqi As Date)
Yday = Format(riqi, "y")
End Function
当前日期是本年的第几季度?
Function Qday(riqi As Date)
Qday = Format(riqi, "第q季度")
End Function
当前日期是本年的第几周
Function Wday(riqi As Date) As String
Wday = Format(riqi, "第ww周")
End Function
当前日期是本年第几周的星期几?
Function WWday(riqi As Date) As String
WWday = Format(riqi, "第ww周") & " 星期" & Format(riqi, "w") - 1
End Function
或
Function WWday(riqi As Date) As String
WWday = Format(riqi, "第ww周 aaa")
End Function |
|