Function formatDate

  • Format date

    Parameters

    • date: string | number | Date

      Date or timestamp to convert to string

    • format: string = 'YYYY-MM-DD H:mm'

      How date string will be formatted, default: YYYY-MM-DD H:mm A

    • Optionaltz: string | number

      Override timezone, can be either string or number

    Returns string

    Formated date