Home > Archive > MS SQL Data Warehousing > July 2005 > Trying to pull data in SQL from a Platinum Database. Have date issues.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Trying to pull data in SQL from a Platinum Database. Have date issues.
Sam

2005-07-13, 1:23 pm

The date in SQL shows up
as 729089
Even in Excel the grid shows for eg. the data as 3/29/3896 when I format
the date as a Date.

I was provided the following information but I am not sure how to change the
date to show correctly.

-------------------

Platinum SQL Version 4.2

Date solution:


'The next two constants are the same date in SQL and Platinum formats.

Global Const gstrPLAT_EQUATE_DATE
= "'1/1/98'"

Global Const glngPLAT_EQUATE_DATE
= 729390

'The SQL expression
DATEDIFF(dd,gstrPLAT
_EQUATE_DATE,sqldate
)+glngPLAT_EQUATE_DA
TE

' converts a SQL date to the equivalent Platinum date.

'The SQL expression
DATEADD(dd,platdate- glngPLAT_EQUATE_DATE
,gstrPLAT_EQUATE_DAT
E)

' converts a Platinum date to the equivalent SQL date





Thank you very much for your assistnace.


S Commar

s_commar@hotmail.com


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com