Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW DO I FORMAT THE DATE FIELD

Hi

I have this table which the date field is in this format 'DD/MM/YYY' (MasterMarkit) I have set the script so that the MasterMarkit concatenates to the MasterBloomberg

However the problem is the MasterBloomberg is in this date this date format 'yyyy-mm-dd' and I need to convert the MasterMarkit to this format

Can someone guide me on how to write the code where when I bring in the date field in MasterMarkit it converts it to yyyy-mm-dd

This is my script so far

MasterBloomergvol:
LOAD "
BBTicker,
"EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST",
"mastproav_date" as Turnover_Date,
Year(mastproav_date) as TYEAR,
Month (mastproav_date)as TMONTH;

SQL SELECT,
BBTicker,
"EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST"

FROM AUM.dbo.masterprodaumvol;

Concatenate (MasterBloomergvol)

MasterMarkit:
LOAD
"msamk_ticker",
"msamk_startdate" as Turnover_Date,
"msamk_turnoverbroker",
"msamk_turnovertotal",
Year(msamk_startdate) as TYEAR,
Month (msamk_startdate)as TMONTH;

SQL SELECT
"msamk_ticker",
"msamk_startdate",
"msamk_turnoverbroker",
"msamk_turnovertotal"
FROM msamarkit.dbo.msamarkit;

1 Solution

Accepted Solutions
Not applicable
Author


MasterBloomergvol:
LOAD "
EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST",
"mastproav_date" as Turnover_Date,
Year(mastproav_date) as TYEAR,
Month (mastproav_date)as TMONTH
date(mastproav_date,'DD/MM/YYYY') AS DATE;
SQL SELECT,
BBTicker,
"EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST"
FROM AUM.dbo.masterprodaumvol;
Concatenate (MasterBloomergvol)
MasterMarkit:
LOAD
"msamk_ticker",
"msamk_startdate" as Turnover_Date,
"msamk_turnoverbroker",
"msamk_turnovertotal",
DATE (msamk_startdate,'DD/MM/YYYY')as DATE;
SQL SELECT
"msamk_ticker",
"msamk_startdate",
"msamk_turnoverbroker",
"msamk_turnovertotal"
msamarkit.dbo.msamarkit;


View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hello,

You will have to do the following in MasterBloomergvol:

Date(Date#(mastproav_date, 'DD/MM/YYYY')) AS Turnover_Date,


and the following in MasterMarkit:

Date(Date#(msamk_startdate, 'YYYY-MM-DD')) AS Turnover_Date,


Hope that helps



Not applicable
Author


MasterBloomergvol:
LOAD "
EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST",
"mastproav_date" as Turnover_Date,
Year(mastproav_date) as TYEAR,
Month (mastproav_date)as TMONTH
date(mastproav_date,'DD/MM/YYYY') AS DATE;
SQL SELECT,
BBTicker,
"EQY_TURNOVER",
"EQY_TURNOVER_EUR",
"PX_LAST"
FROM AUM.dbo.masterprodaumvol;
Concatenate (MasterBloomergvol)
MasterMarkit:
LOAD
"msamk_ticker",
"msamk_startdate" as Turnover_Date,
"msamk_turnoverbroker",
"msamk_turnovertotal",
DATE (msamk_startdate,'DD/MM/YYYY')as DATE;
SQL SELECT
"msamk_ticker",
"msamk_startdate",
"msamk_turnoverbroker",
"msamk_turnovertotal"
msamarkit.dbo.msamarkit;


Not applicable
Author

Thanks.......................... it worked!!