Home > Topics > Access > body text

How to format time in access

王林
Release: 2020-12-23 10:51:23
forward
2645 people have browsed it

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 "
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template