Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gnmq
Contributor III
Contributor III

Date Formatting

Hello all,

 

I have two tables which I want to combine.

Table A: Date_Key, ProductName, Sales

Table B: Date_Key, ProductName, Sales, CurrRates, CurrUnit

 

Upon combining the two tables, the result table returned two different date values.

Date_Key of both tables are in the "YYYYMMDD" format.

 

CONCATENATE(TableA)

LOAD
Date(DATE_KEY,'YYYYMMDD') AS DATE_KEY,
ProductName,
CurrUnit,
Sales
RESIDENT TableB;

DROP TABLE TableB;

It seem like one of my table captured the date field as TEXT while another table captured it as Date. Hence, when appending it result in two different format of values i.e., numeric date and YYYYMMDD.

Is there any way to standardize the type?

 

2 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try to use 

Date#(DATE_KEY,'YYYYMMDD') AS DATE_KEY,

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

Keep same format in both the table using Date#(), Date() and current format of the date.