Home  >  Article  >  Topics  >  How to format time in access

How to format time in access

王林
王林forward
2020-12-23 10:51:232421browse

How to format time in access

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:

How to format time in access

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete