why doesn't this code work when asking for the month of the date?
Show older comments
clear
clear all
clc
prompt = ['Please enter the starting date mm/dd/yyyy: \n' ... '(Ex. 07/27/2004 or 7/27/2004) \n\n'];
%
% my intended input is 7/11/2016
%
D = input(prompt,'s');
D
[DayNumber] = weekday(D)
datestr(D)
m = month(D,'name')
4 Comments
Adam
on 28 Jul 2017
What doesn't work about it? What was the input? Please give useful information if you want help with something.
leon
on 29 Jul 2017
James Tursa
on 29 Jul 2017
What is f?
leon
on 29 Jul 2017
Accepted Answer
More Answers (0)
Categories
Find more on Time Series Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!