minute
Returns the minutes in a given date string, s.
Syntax
R = minute(s)
R = minute(s, fmt)
Inputs
- s
- A string representing a date. By default, if no fmt is specified, s is expected to be in the format dd-mmm-yyyy. If in this format, minute returns 0.
- fmt (optional)
- Gives the given format that s is in. Valid formats that can return
a valid minute value are:
- 'dd-mmm-yyyy HH:MM:SS'
- 'HH:MM:SS'
- 'HH:MM:SS PM'
- 'HH:MM'
- 'HH:MM PM'
- 'mmm.dd,yyyy HH:MM:SS'
- 'yyyymmddTHHMMSS'
- 'yyyy-mm-dd HH:MM:SS'
Outputs
- R
- Minutes from the given date string s. 0 returned for most formats, fmt, which don't specify minutes.
Examples:
Return minutes from a string in a specific date format:
R = minute('Apr.04,2019 10:11:12', 'mmm.dd,yyyy HH:MM:SS')
R = 11