|
by: josh |
last post by:
datetime.time should support timedelta arithmetic, patch attached.
Times greater than 24 hours should not raise an exception, but always
wrap around. Any other behavior is too surprising. (People expect to be
able to call you up at 11pm, and say "meet me in two hours" (if you're a
night person)).
Clock time is cyclical. Though it's convenient to assign hours numbers,
an unqualified hour 23.5 is not naturally "greater than" hour 0.5....
|
by: Philipp |
last post by:
Hello Pythonistas
I'm new to Python, I hope you understand my question.
I would like to pass a parameter "gap" to a function. gap should be
used there to create a timedelta Object.
from datetime import *
def f(gap):
print (datetime.now() + datetime.timedelta(gap))
|
by: kpp9c |
last post by:
Hi,
I was looking at python & datetime and hoping that it would already
have
a method/func to translate time formats. I need to translate seconds to
hh:mm:ss.ms and vice versa and would like the ability to do some basic
arithmetic in these formats. I think that there just has to be a
package
or module out there that already does this with reasonable speed and
accuracy.
|
by: Lad |
last post by:
Hello,
what is the best /easest way how to get number of hours and minutes
from a timedelta object?
Let's say we have
aa=datetime.datetime(2006, 7, 29, 16, 13, 56, 609000)
bb=datetime.datetime(2006, 8, 3, 17, 59, 36, 46000)
so
c=bb-aa
will be
datetime.timedelta(5, 6339, 437000)
|
by: kath |
last post by:
Hi,
the following shows the contents of "datebook.xls"
Date
8/9/2006
8/9/2006
8/9/2006
8/9/2006
8/9/2006
|
|
by: ian |
last post by:
Hi,
i have a problem with time in python.
1) i got 2 values from mysql db (fields are "time" type)
2) python get it as "<type 'datetime.timedelta'>" (why timedelta???)
3) i need to compare 2 fields with actual time ... EG:
if ArrOutputsAuto.TimeFrom >= GNow and ArrOutputsAuto.TimeTo <= GNow:
i need actual time, and 2 fields from DB in datetime.time type (correct me
|
by: skip |
last post by:
Running from Subversion, I see confusing (to me) behavior related to
division of datetime.timedelta objects by integers:
% python
Python 2.6a0 (trunk:57277:57280M, Aug 28 2007, 17:44:49)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'datetime.timedelta' and 'int'
|
by: Jeremy Sanders |
last post by:
Hi - I need to add support to a program for dates and times. The built-in
Python library seems to be okay for many purposes, but what I would like
would be Unix epoch style times (seconds relative to some date), covering a
large period from the past to the future. What would be nice would be a
library which can take floating point seconds from an epoch.
Does anyone know of a library which can convert from human style dates and
times to a...
|
by: Zwoker |
last post by:
Hi All,
I'm using MS Access 2003. I have been trying to find out why portions of my VBA code have been running slower than expected, using code like the following:
Dim StartTime, EndTime As Date
Dim TimeDelta As Single
StartTime = Time
<Call some procedure>
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|