Option Explicit Dim mrc As ADODB.Recordset Public txtSQL As String Dim MsgText As String Private Sub Form_Load() ShowTitle ShowData flagEdit = True End Sub Private Sub Form_Resize() If Me.WindowState vbMinimized And fMainForm.WindowState vbMinimiz
查询本日记录
SELECT * FROM messages WHERE CONVERT(Nvarchar, CreateDate, 111) = CONVERT(Nvarchar, GETDATE(), 111) ORDER BY CreateDate DESC
SELECT * FROM 表 WHERE datediff(day,列名,getdate())=0
查询本年
SELECT count(*) FROM messages WHERE datediff(year,CreateDa