Assume that the table has a time field in Unix timestamp format. You need to calculate the number of records per day based on this field. Method: Use the convert function convert (char (10), time, 120) astime, and then groupbytime. Principle: The convert function converts the timestamp to the ODBC Standard Time (specified by the 120 parameter), and then takes the first 10 digits, which is just better.
Assume that the table has a time field in Unix timestamp format. You need to calculate the number of records per day based on this field. Method: Use the convert function convert (char (10), time, 120) as time, and then group by time. Principle: The convert function converts the timestamp to the ODBC Standard Time (specified by the 120 parameter), and then takes the first 10 digits, which is just better.
Assume that the table has a time field in Unix timestamp format. You need to calculate the number of records per day based on this field.
Method:
Use the convert function convert (char (10), time, 120) as time, and then group by time.
Principle: The convert function converts the timestamp to the ODBC Standard Time (specified by the 120 parameter), takes the first 10 digits, and obtains the complete date (excluding the time, minute, and second), and then groups it.
The duration of the first parameter of the convert () method is the same as that of the yearly grouping method.