Additional Date Functions

    First Date of last month =DateAdd(“m”, -1, DateSerial(Year(Now()), Month(Now()), 1)) =Today.AddDays(1- Today.Day).AddMonths(-1) Last date of last month =DateAdd(“d”, -1, DateSerial(Year(Now()), Month(Now()), 1)) =Today.AddDays(-1.0 * Today.Day) First date of current month =DateSerial(Year(Now()), Month(Now()), 1) =Today.AddDays(1 – Today.Day) Last date of current month =DateAdd(“d”,-1,(DateAdd(“m”, 1, DateSerial(Year(Now()), Month(Now()), 1)))) =Today.AddDays(-1 * Today.Day).AddMonths(1) Yesterday’s date  =DateAdd(“d”, -1,…

Read More

Handy Date Calculations

  /* Handy Date Stuff */ —-Today SELECT GETDATE() ‘Today’   –Full Day SELECT CAST(GETDATE() as date) AS DT  —-Yesterday SELECT DATEADD(d,-1,GETDATE()) ‘Yesterday’  —- Previous Day  DATEADD(day, DATEDIFF(day, 0, yourDate), 0)   —-First Day of Current Week SELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0) ‘First Day of Current Week’  —-Last Day of Current Week SELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6) ‘Last Day of Current Week’  —-First…

Read More

Resetting the QuickBooks FIM Integration for Exact MAX

1) First, I would remove the integrated applications in QB (Edit–Preferences–Integrated applications–Company tab). Highlight the two and remove.2) Next, I would delete the ExactRM user in QB3) Then remove the QBFC 11 from Control Panel–Uninstall Program4) Rename the ExactMAXQB.xml.5) Make sure all users are out of MAX and QB.6) Go to Finance–Financial Integration–Options–Integration Setup. Click…

Read More

Command Line Script to Open Ports for SQL Server

    @echo =========  SQL Server Ports  ===================@echo Enabling SQLServer default instance port 1433netsh firewall set portopening TCP 1433 “SQLServer” @echo Enabling Dedicated Admin Connection port 1434netsh firewall set portopening TCP 1434 “SQL Admin Connection” @echo Enabling conventional SQL Server Service Broker port 4022  netsh firewall set portopening TCP 4022 “SQL Service Broker” @echo Enabling…

Read More