Introduction:
Today a customer reported a problem, saying that the software can only upload data to one of the computers, but not to other computers.
(Learning video sharing: Programming video)
Cause analysis:
A certain field in the access database uses date format. Due to different The computer (operating system) time format is different, so the format displayed in the table after querying is also different, as shown in the figure:
Solution:
We can’t let customers check the format of each computer, so we add a formatting function (Format) to the query statement to ensure that the found time format remains consistent:
sql = "select T_ProNo as 项目, Format(D_Testdate,'yyyy-MM-dd HH:mm:ss') as 检测时间 from T_sample "
Related recommendations: access Database tutorial
The above is the detailed content of How to format time in access. For more information, please follow other related articles on the PHP Chinese website!