21 Replies Latest reply: Jan 17, 2018 8:48 AM by Yeo Poh sai RSS

    How to convert date format DD-MM-YYYY into Year ?

    Yeo Poh sai

      How to convert date format DD-MM-YYYY into Year ?


      Hi All


      I have import a raw data file from Excel to Qli View.


      I try to convert the imported field name = [Expected Close Date] in order year format YYYY.


      I have try to using the below expression :-


      //   text(right(Year(date#([Expected Close Date],'DD/MM/YYYY')), 2),'00') as Year,

      //   dual(right(Year(date#([Expected Close Date],'DD/MM/YYYY')), 2),'00') as Year,

      //   year(today()) - year([Expected Close Date]) + 1                                         as Year,

      //   num(right(Year(date#([Expected Close Date],'DD/MM/YYYY')), 2),'00') as Year,

      //   dual(right(Year(date#([Expected Close Date],'DD/MM/YYYY')), 2),'00') as Year,

      //   Right(year([Expected Close Date]),2)          as Year,


      All the above not able to work.


      Can some one advise me.


      Paul Yeo