Date format

Posted by: eveverad3 on 27 March 2019, 4:59 am EST

    • Post Options:
    • Link

    Posted 27 March 2019, 4:59 am EST

    Hello Team,

    Working with Angular 7

    I would like to format a date in the below example

    https://stackblitz.com/edit/angular-nsis2g

    I tried using wjcCore.Globalize.format but seems not to work.

    Here is the part to see in the code:

    wjcCore.Globalize.format(‘2030-01-01T00:00:00’, ‘dd-MM’)

    It is visible under Downloads column when we click on the MultiSelect dropdown.

    Thanks,

  • Posted 27 March 2019, 6:58 am EST

    Hello,

    The format method takes the first argument as a number or a date. Therefore, the first argument should be converted into a date object before passing it to the method.

    wjcCore.Globalize.format(new Date('2030-01-01T00:00:00'), 'dd-MM');
    
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels