SQL Time Difference

 Subtracting Date Time in MSSQL –YEARSELECT DATEDIFF(year, ‘2012-12-31’, ‘2013-01-01’) –QuarterSELECT DATEDIFF(quarter, ‘2012-01-01 23:59:59’, ‘2013-01-01 00:00:00’) –MonthSELECT DATEDIFF(month, ‘2012-12-31 23:59:59.9999999’, ‘2013-02-01 00:00:00.0000000’) –DaySELECT DATEDIFF(day, ‘2012-12-01 23:59:59.9999999’, ‘2012-12-31 00:00:00.0000000’) –WeekSELECT DATEDIFF(week, ‘2013-06-01…

Read More

VB 6 Send Email

VB Send Email with a HTML Format body Private Sub Command1_Click()Dim EmailList, Mailbod As String, MyfileDim objOutlook As Outlook.ApplicationDim newapp As Outlook.MailItem, objRecip As Outlook.RecipientDim objRWhtm As Outlook.AttachmentDim StrBody As…

Read More

Disable/Enable MS Access Ribbon

When your developing an MS Access application make sure you remove the Ribbon so that your application looks clean. Here’s how to remove the Ribbon. ‘Disable MS Access Ribbon DoCmd.ShowToolbar “Ribbon”, acToolbarNo ‘Enable MS Access…

Read More