calendar

trying to get date from a customer date picker in pything and tkinter

trying to get date from a customer date picker in pything and tkinter Question: I want to minimize the number of clicks and typing a user has to go through to select a date. This code pops up a date picker with the option of either clicking on a date or the cancel button, or …

Total answers: 1

How to Get all Day Names from a particular month

How to Get all Day Names from a particular month Question: Given a year and month, I want to print out the name of each day of the month, in order. import calendar weekday = calendar.weekday(2021,4) myday = calendar.day_name[weekday] print(myday) Actual Output Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: weekday() …

Total answers: 3

PYTHON – How to change data entry state to normal?

PYTHON – How to change data entry state to normal? Question: I can disable the calendar widget with the ‘Disable’ button, but if I want to reactivate it, I get the following error: tkinter.TclError: unknown option "-normal" If i try to use the calendar.config(state="normal") command, I get the following error: tkinter.TclError: unknown option "-state" import …

Total answers: 1

Convert my list of datetime objects to a month wise date frame segregation or directly plot it

Convert my list of datetime objects to a month wise date frame segregation or directly plot it Question: my_original_list = [‘December 1, 2003’, ‘February 22, 2004’, ‘February 29, 2004’, ‘March 8, 2004’, ‘December 25, 2003’] I have extracted the above list from a .txt file and converted it into datetime using from datetime import datetime …

Total answers: 1

trouble calculating the amount of Sundays inbetween 2 dates

trouble calculating the amount of Sundays inbetween 2 dates Question: I was asked to create a program that calculates the number of Sundays inbetween 2 dates! I have been searching numerous articles and documentation but I still have a hard time understanding syntax. (2 months into my coding course with 0 technology and computer experience.) …

Total answers: 2

Calendarized cost by year and month in Spark

Calendarized cost by year and month in Spark Question: I am fairly new to PySpark and looking for the best way to perform the following calculations: I have the following data frame: +————-+————+————–+————+————+—–+ |invoice_month|invoice_year|start_date_key|end_date_key|invoice_days| cost| +————-+————+————–+————+————+—–+ | 11| 2007| 20071022| 20071120| 30| 100| | 12| 2007| 20071121| 20071220| 30| 160| | 5| 2014| 20140423| 20140522| …

Total answers: 2

How to change date format in html

How to change date format in html Question: In HTML, I am date type, but it’s giving me yyyy-mm-dd. I want to use dd-mm-yyyy format. Can anyone give me a suggestion? <fieldset style = "font-size:15px;"> <input type="date" name = "fromdate" placeholder = "FROM: DD-MM-YYYY" /> </fieldset> {% comment %} <option value="2P">2P</option> {% endcomment %} <fieldset …

Total answers: 1

Can users switch months on website using python calendar library

Can users switch months on website using python calendar library Question: I am making web application with django. I am using python calendar library to create HTML calendar. I was wondering if there is a builtin way to allow users switch months while on website or if I have to make it work using JavaScript. …

Total answers: 1

Easter change month

Easter change month Question: I need to print every Easter Sunday of 21st century. I need to determine the month: 4 (April) when the day d is no more than 30; if it’s greater, then I need to convert that to the proper day in May. For instance, d=32 would be m=5, d=2 or May …

Total answers: 2