如何获得当前年份使用Vba [英] How To Get The Current Year Using Vba

查看:459
本文介绍了如何获得当前年份使用Vba的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图让当年使用VBA。是否有任何预构建功能可以找出当前年份?

解决方案

 年份(日期)

Year():Returns日期参数的年份部分。

日期:仅当前日期。



说明来自此处的这两项功能。


I am trying to get the current year using VBA. Is there any pre-build function available to find out the current year?

解决方案

Year(Date)

Year(): Returns the year portion of the date argument.
Date: Current date only.

Explanation of both of these functions from here.

这篇关于如何获得当前年份使用Vba的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆