格式化日期时间为指定格式
Easp.Date.Format(DateTime, FormatTime)
DateTime | String (字符串) |
需要格式化的时间 | |
FormatTime | String (字符串) |
需要格式化的格式 |
格式后的时间 String (字符串) | 返回格式化后的时间。 |
FormatTime 按照时间标准即可
Dim datetime datetime = "2013-12-22 23:34:45" Easp.print("给定日期是:") Easp.println Easp.Date.Format(datetime, "y-mm-dd hh:ii:ss 星期w") Easp.print("从现在算起是:") Easp.println Easp.Date.Format(datetime, Now)
本示例运行结果是:
给定日期是: 2013-12-22 23:34:45 星期日 从现在算起是: 去年12月