In the IDC charging system, the date is used for query, so the automatic date addition function is not used in the data table, but is inserted in a custom format. However, due to the absence of a unified format for time conversion in advance, problems may occur during subsequent queries.
The format of the insert time must be consistent, otherwise there may be no results during the query. The conversion format of time and date is very knowledgeable and cannot be converted incorrectly. The following uses the format function as an example (of course, there are many other conversion methods ):
Time Format:
Format(Now(),"HH:mm:ss")
Date Format:
Format(Now(),"yyyy/MM/dd")
If you change the mm in the time format to mm, the result will not be the time. After continuous exploration, the following conclusions are drawn:
In the time and date Formatting Function, MM indicates the month, MM indicates the minute, HH indicates the 24-hour system, and HH indicates the 12-hour system. You must note these four points! Other letters must be in lower case; otherwise, the characters are displayed. It doesn't matter whether the delimiter ":", "/", or "-" is used, as long as it is unified.
The datepicker control is used in the report. During query, we need to change its default format to the same format as that in the data table. The implementation method is as follows:
First, set the format attribute to custom, and then set the desired format in the customformat attribute.