Atul,
I have attached copies of the MS-SQL functions that I use to convert Remedy date/time and date values. Hopefully you will find one of these helpful for what you are attempting to accomplish.

convert_date_to_epoch.sql: converts MS-SQL datetime values (or any string that represents a valid datetime value) to the "epoch" date format used to store Remedy date/time fields in the database (# of seconds since January 1, 1970 12:00:00 AM GMT). The last section of the function must be adjusted to represent the correct offsets (in seconds) from GMT in your time zone for standard time and daylight saving (summer) time.

convert_epoch_to_date.sql: converts the "epoch" date format used to store Remedy date/time values in the database (# of seconds since January 1, 1970 12:00:00 AM GMT) to MS-SQL datetime format. The last section of the function must be adjusted to represent the correct offsets (in seconds) from GMT in your time zone for standard time and daylight saving (summer) time.

datetime_to_DateOnlyInt.sql: converts MS-SQL datetime values (or any string that represents a valid datetime value) to the integer value used to store Remedy date fields in the database (# of days since January 1, 4713, B.C.)

DateOnlyInt_to_datetime.sql: converts the integer value used to store Remedy date fields in the database (# of days since January 1, 4713, B.C.) to MS-SQL datetime format. MS-SQL datetime values do not go back this far, so the function will always return the minimum MS-SQL datetime value (January 1, 1753) for any Remedy date values prior to this range.

Regards,

Thomas Bean

----- Original Message ----- From: "Atul Vohra" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.crm.arsystem.general
To: <[email protected]>
Sent: Monday, October 01, 2007 10:27 PM
Subject: Convert Date in to timestamp in remedy


Hi,

We are using ARS 6.3, MS SQL. I want to update a date field using direct sql - can some one help me with this.

Is there a function to convert the date field in to timestamp or can I use the sql to update the date field directly.

Thanks
Atul

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers 
Are"

Attachment: datetime_to_DateOnlyInt.sql
Description: Binary data

Attachment: convert_date_to_epoch.sql
Description: Binary data

Attachment: convert_epoch_to_date.sql
Description: Binary data

Attachment: DateOnlyInt_to_datetime.sql
Description: Binary data

Reply via email to