Foro de discusión, ayuda y aprendizaje de electricidad doméstica e industrial, documentación técnica, averías, cursos, normativa, software técnico, bajo consumo, reparación de electrodomésticos, instalaciones singulares de imagen y sonido..

Bienvenido a foroelectricidad.com.

Somos una comunidad de profesionales y aficionados al mundo de la electricidad.

Para participar, puedes registrarte en la comunidad y en pocos clicks podrás disfrutar de todas las características del foro. También te recomendamos que te pases por las Normas del foro, y si tienes alguna duda del funcionamiento del mismo puedes consultar el FAQ o ponerte en contacto con nosotros.

El Equipo de Foroelectricidad.com

Reglas del Foro
Para publicitar tu negocio a través de banners en foroelectricidad.com ponte en contacto con el administrador en la siguiente dirección de correo: admin@foroelectricidad.com
 
johnace25
Usuario experto
Usuario experto
Autor del tema
Mensajes: 4819
Registrado: 23 Mar 2026, 07:52
Ubicación: Barcelona

how to find out day from date

10 Abr 2026, 14:01

Hello, visitor!

Article about how to find out day from date:
Stack Overflow
How do I get the day of week given a date? I want to find out the following: given a date ( datetime object), what is the corresponding day of the week? For instance, Sunday is the first day,
How do I get the day of week given a date?

>> ENTER THE SITE <<


I want to find out the following: given a date ( datetime object), what is the corresponding day of the week? For instance, Sunday is the first day, Monday: second day.. and so on. And then if the input is something like today's date. Example. The output is maybe 6 (since it's Friday) 31 Answers 31. Return the day of the week as an integer, where Monday is 0 and Sunday is 6. One important thing to note is that in JavaScript 0 = Sunday, Python starts with 0 = Monday. Something that I ran into, front-end vs back-end.. If you'd like to have the date in the language of your current locale: This seems to be the best answer to generate an English, day-of-week date. I'm guessing it's not upvoted more simply because the answer is ~1 month old, while the question is ~3 years old. @NathanTew 1) is my_date" a variable? 2) can this be used in a query/aggregation? I want to count the average number of meals ordered on mondays/tuesdays/wednesdays. Each order is on a new line, and just like this question, the weekday has to be retrieved from the data-time column of the csv file that we've just uploaded to elasticsearch. If you'd like to have the date in the language of your current locale: Use date.weekday() when Monday is 0 and Sunday is 6. date.isoweekday() when Monday is 1 and Sunday is 7. Because the op asked with regards to a datetime object (not a date object) I’d like to mention that the datetime class sports the same weekday() and isoweekday() methods. I solved this for a CodeChef question. A solution whithout imports for dates after 1700/1/1. @himanshu219 Because there's an exception from the leap year rule every 400 years, and aux was derived from year -1700 , so we need to add 100 to make it a multiple of 400. For example: 2000 - 1700 = 300, so + 100 gives us 400. Not sure though why aux is used to determine the leap year in that lime and not just year itself. If you have dates as a string, it might be easier to do it using pandas' Timestamp. Here's a simple code snippet to solve this problem. The output should be: This is a solution if the date is a datetime object. datetime library sometimes gives errors with strptime() so I switched to dateutil library. Here's an example of how you can use it : The output that you get from this is 'Mon' . If you want the output as 'Monday', use the following : This worked for me pretty quickly. I was having problems while using the datetime library because I wanted to store the weekday name instead of weekday number and the format from using the datetime library was causing problems. If you're not having problems with this, great! If you are, you cand efinitely go for this as it has a simpler syntax as well.













how to find out the day i got pregnant


how to find out amazon prime renewal date


how can i find out someone's date of birth


how to find out the exact date i got pregnant


how can you find out someone's date of birth