'获得时间的字符串形式,例如:20031110
Function GetDateStringByDateTime(ByVal DateTime As Date) As String
Return DateTime.Year & Format(DateTime.Month, "00") & Format(DateTime.Day, "00")
End Function
博客展示了一个获取时间字符串形式的函数。函数名为GetDateStringByDateTime,接收一个Date类型参数,通过拼接年、月、日的方式,返回如20031110格式的日期字符串,属于信息技术领域编程内容。
'获得时间的字符串形式,例如:20031110
Function GetDateStringByDateTime(ByVal DateTime As Date) As String
Return DateTime.Year & Format(DateTime.Month, "00") & Format(DateTime.Day, "00")
End Function

被折叠的 条评论
为什么被折叠?