3 Replies Latest reply: Sep 28, 2010 7:45 AM by ANGUYEN100 RSS

    HOW DO I FORMAT THE DATE FIELD

    ANGUYEN100

      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;

       

       

        • HOW DO I FORMAT THE DATE FIELD
          Miguel Angel Baeyens de Arce

          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



          • HOW DO I FORMAT THE DATE FIELD

             


            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;