Company: Link Technologies
Case No: L12379
Logged By: Sanjay (Link Technologies) on 03 Apr 2011 10:08PM
Priority: Not Applicable
Product: Other
Group: To be assigned
Time Taken: 0.00
Assigned To: Sanjay (Link Technologies)
Circulation: Sanjay
Resolve By: Sunday, 03 April 2011 10:08 PM [4771 days since logged date]
Status: Closed
Subject: CRM database stores datetime values Using Daylight Saving adjustment
Summary:    The CRM systsm stores datetime values in the database using DAYLIGHT Savings adjusted values. Therefore when uploading historical data, you need to take this into account.

If you default the time portion of the dates to '00:00:00:00', dates will display as ONE DAY BEFORE for date periods which fall during the daylight savings period. The best solution is to put the TIME as MIDDAY when you do not have a time portion. This way, when daylight savings adjustments are made, the date portion will not change.

This script will adjust existing data by 12 hours changing the TIME portion from 12Am to 12PM. Make sure you only run this ONCE.

-- START OF SCRIPT
update vwOrders set enddatetime_c = dateadd(hour,12,enddatetime_c) where convert(varchar(12),enddatetime_c,108) = '00:00:00'
update vwOrders set startdatetime_c = dateadd(hour,12,startdatetime_c) where convert(varchar(12),startdatetime_c,108) = '00:00:00'
-- EMD OF SCRIPT
Audit Notes:
If you have any queries regarding this support incident, please email admin@linktechnologies.com.au and include the Case No: L12379 in the subject line of all emails regarding this issue.

Document size: 1.0 KB
For call complaints, please contact the Managing Director of the company using this form