day
Returns the day of a given date string, s.
Syntax
R = day(s)
R = day(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.
- fmt (optional)
- Returns the given format that s is in. Valid formats that can
return day are:
- 'dd-mmm-yyyy HH:MM:SS'
- 'dd-mmm-yyyy' 'mm/dd/yy'
- 'mm/dd'
- 'dd/mm'
- 'dd/mm/yy'
- 'mmm.dd,yyyy HH:MM:SS'
- 'mmm.dd,yyyy'
- 'mm/dd/yyyy'
- 'dd/mm/yyyy'
- 'yy/mm/dd'
- 'yyyy/mm/dd'
- 'yyyy-mm-dd'
- 'yyyymmddTHHMMSS'
- 'yyyy-mm-dd HH:MM:SS'
Outputs
- R
- Returns the day from the given date string s
Examples:
R = day('10-Apr-2019')
R = 10
R = day('Apr.04,2019 10:11:12', 'mmm.dd,yyyy HH:MM:SS')
R = 4