Function timeFormat

  • format type by fmt

    Parameters

    • rowDate: string | number | Date

      [date instance|date string|timestamp]

    • fmt: string

      eg:YYYY-MM-DD HH:mm:ss

    Returns string

    formated date

    Example

    timeformat('2018-10-10 10:30:20', 'MM/DD HH:mm)
    // => 10/10 10:30

    const date = new Date('2018-10-10 10:30:20')
    timeformat(date, 'MM/DD HH:mm)
    // => 10/10 10:30

    const date = new Date('2018-10-10 10:30:20')
    timeformat(date.getTime(), 'MM/DD HH:mm)
    // => 10/10 10:30

Generated using TypeDoc