Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi Pankaj ! I need some help. I have a sample .CSV file from a Finger mark scanner to maintain attendance of employees. Can some one help me with a code to convert, Date, and other two Time columns to Date/Time in Pandas? I get an error. please see the attachment. https://colab.research.google.com/drive/1dnfigKSDoZsXiVIByWojXnkSgAEI6WOr Thank you !!! Indrajith - Sri Lanka 0772 078 441 / Mobile/Wtsapp
- Indrajith
In the datetime module, there is a function “datetime.datetime.today().weekday()”. This function returns the day of the week as an integer, where Monday is 0 and Sunday is 6. Please write a Python program using a for loop to generate and print log entries for the rest of the week starting from today. For example, if today is Wednesday, the program prints “Wednesday entry:”, “Thursday entry:”, “Friday entry:”, and “Saturday entry:” in separate lines. (Hint: the lower end of the range is today’s weekday and the upper end is 5 for Saturday).
- bhaigan
Thank you Sir! Found this arrticle very useful, when converting string data to dates in MongoDB documents!
- Victor Ochieng
Hi what about the day of the month, without 0-padding? 1,2,3,…,10,…30,31? In strftime it would be %-d, but that verbose doesn’t work when using to_datetime (string_to_convert_in_date, format=format_to_use) Any ideas? Thanks
- nono_london
Hello, Can you please let me know, how to compare 2 dates with $gte and $lte using python and mongodb ?
- RB
There is a mistake in this article. The ‘y’ in ‘%m/%d/%y’ will be capital. so the format will be ‘%m/%d/%Y’ i faced this problem this is the mistak in this article
- new
in string to datetime code line no 5 datetime_object = datetime.strptime(datetime_str, ‘%m/%d/%y %H:%M:%S’) must be datetime_object = datetime.datetime.strptime(datetime_str, ‘%m/%d/%Y %H:%M:%S’) 1. datetime itself a module which have no strptime attribute. 2. %y must be %Y. A format is a format which cannot be changed.
- Keshav wadhwa
Hello Sir, How can we convert Tue AUG 11 02:30:18 UTC 2020? I tried from datetime import datetime datetime_object =“” datetime_str = “Tue Aug 11 01:40:27 UTC 2020” try: datetime_object = datetime.strptime(datetime_str, ‘%A %B %d %H:%M:%S %Z %Y’) print(type(datetime_object)) print(datetime_object) except ValueError as ve: print(‘ValueError Raised:’, ve) But it is not working.Can you please help?
- Tiny Jimmy