Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

date format

I have two fact tables which I link through following code

LOAD POLICY_NO

  & ' | ' & BCOD

   & ' | ' & POL_PERIOD_TO               // date field

  & ' | ' & PRD_CODE

  as Key_Field,

731|BC|10-JUN-2014|1A        KEY FIELD FROM TABLE 1

731|BC|41657|1A                   KEY FIELD FROM TABLE 2

I have used the following script in data load for the date field POL_PERIOD_TO

date(floor(POL_PERIOD_TO),'DD-MMM-YYYY') AS POL_PERIOD_TO,

But date (POL_PERIOD_TO) is returned in two different formats as highlighted in red above. I presume  due to this problem expected results are not returned from the data.

Is it possible ?

If so how can I correct it please ?

5 Replies
MK_QSL
MVP
MVP

Use as below :

LOAD POLICY_NO

  & ' | ' & BCOD

   & ' | ' & Date(Date#(POL_PERIOD_TO,'DD-MMM-YYYY'))             // date field

  & ' | ' & PRD_CODE

  as Key_Field,

tobias_klett
Partner - Creator II
Partner - Creator II

Hi,

I prefer to use numerics of the Dates in keys: ...& num(POL_PERIOD_TO) &...

Tobias

anbu1984
Master III
Master III

What is the format of date in col "POL_PERIOD_TO" from Table1 and Table2?

upaliwije
Creator II
Creator II
Author

Numeric in both tables

anbu1984
Master III
Master III

Then use as is in the Key. Dont need to change that to date format in Key.