FunctionSQLTimeFormat(UTCTime)
SQLTimeFormat=Year(UTCTime)&"-"&Right("00"&Month(UTCTime),2)
SQLTimeFormat=SQLTimeFormat&"-"&Right("00"&DAy(UTCTime),2)
SQLTimeFormat=SQLTimeFormat&""&Right("00"&Hour(UTCTime),2)
SQLTimeFormat=SQLTimeFormat&":"&Right("00"&Minute(UTCTime),2)
SQLTimeFormat=SQLTimeFormat&":"&Right("00"&Second(UTCTime),2)
EndFunction
其中Right("00"&Month(UTCTime),2)的"00"什么意思?最好能举个例子,谢谢!
最佳答案
月取两个字符,“00”表示的是显示格式。
比如当前是7月,如果直接取月份的话就是7,用“00”格式的取月就是07.
提问者对于答案的评价:
谢谢!