将数字组从头开始 [英] Put the digit groups from end to start

查看:101
本文介绍了将数字组从头开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VBA中是否有任何可以更改的功能,例如96/01/25到25/01/96。将日,月,年的数字组放在相反的方向。



Karim Vaziri问候,

解决方案

您可以采用任何方式格式化数据对你有意义。例如,如果您有日期字段,并希望将其格式化为日/月/年,则可以执行以下操作:


格式(YourDateField," dd / mm / yy")


在上面的示例中,如果我输入"01-25-2017",到格式化功能,我得到"25/01/17"


有关使用格式化功能的更多详细信息,请参阅以下链接:


https://msdn.microsoft.com/en-us/library/office/gg251755。 ASPX


Is there any function in VBA that I could change for example 96/01/25 to 25/01/96. Put the digit groups of day,Month and year in opposite direction.


Karim Vaziri Regards,

解决方案

You can format your data in whatever manner makes sense to you. If you have Date field, for example, and want to format it for Day/Month/Year, you could do this:

Format(YourDateField, "dd/mm/yy")

In the example above, if I input "01-25-2017" to the Format function, I'd get "25/01/17"

See the link below for more details on using the Format function:

https://msdn.microsoft.com/en-us/library/office/gg251755.aspx


这篇关于将数字组从头开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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