Javascript – Writing Calculated CRM field to the database

//force the result to the database crmForm.all.DesiredField.ForceSubmit = true

SQL Date Functions

Sites with Date Formatting http://www.sql-server-helper.com/tips/date-formats.aspx http://www.blackwasp.co.uk/SQLDateTimeFormats.aspx http://www.mssqltips.com/tip.asp?tip=1145 Other Date Formats SELECT MONTH(CURRENT_TIMESTAMP);- Return a Month(6) SELECT DAY(CURRENT_TIMESTAMP);-Return a Day:(22) SELECT DATE(CURRENT_TIMESTAMP); – returns a date (2004-06-22) SELECT TIME(CURRENT_TIMESTAMP); – returns the time (10:33:11.840) SELECT DAYOFWEEK(CURRENT_TIMESTAMP); – returns a numeric value (1-7) SELECT DAYOFMONTH(CURRENT_TIMESTAMP); – returns a day of month (1-31) SELECT DAYOFYEAR(CURRENT_TIMESTAMP); – returns the [...]

SQL Find the last day of the month

Often I need to produce data for a SQL Reporting Services report where the data is filtered by the last day of the month. I found a solution to this query at this site HERE: —-Last Day of Previous Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) LastDay_PreviousMonth —-Last Day of Current Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) LastDay_CurrentMonth —-Last Day [...]