Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:36 PM, Mark Lawrence wrote: On 06/02/18 19:45, Ken Green wrote: Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below

Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:20 PM, David Rock wrote: On Feb 6, 2018, at 13:45, Ken Green wrote: Traceback (most recent call last): File "A_Weekday.py", line 20, in answer = datetime.date(year, month, day).weekday() NameError: name 'datetime' is not defined Your error message tells you the probl

Re: [Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Mark Lawrence
On 06/02/18 19:45, Ken Green wrote: Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below. Running Python 2.7 on Ubuntu 16.04. Thanks. ==

Re: [Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread David Rock
> On Feb 6, 2018, at 13:45, Ken Green wrote: > Traceback (most recent call last): > File "A_Weekday.py", line 20, in > answer = datetime.date(year, month, day).weekday() > NameError: name 'datetime' is not defined Your error message tells you the problem. You are importing date _from_ d

[Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Ken Green
Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below. Running Python 2.7 on Ubuntu 16.04. Thanks. ===