In this statement:
"INSERT INTO logins(accounti d,userid,login, jobdesc)
values($preacco untid,$userid,N OW(),'$jobdesc' )")
How do I add an hour to NOW() ?
I tried NOW+60*60, but it adds 37 minutes, which makes no sense at all. 2 1278
meltedown wrote: In this statement: "INSERT INTO logins(accounti d,userid,login, jobdesc) values($preacco untid,$userid,N OW(),'$jobdesc' )")
How do I add an hour to NOW() ? I tried NOW+60*60, but it adds 37 minutes, which makes no sense at all.
I found a web page that explained it http://www.phpbuilder.com/board/show...oto=nextoldest
"INSERT INTO logins(accounti d,userid,login, jobdesc)
values($preacco untid,$userid,a dddate(NOW(),in terval 1 hour),'$jobdesc ')");
>In this statement: "INSERT INTO logins(accounti d,userid,login, jobdesc) values($preacc ountid,$userid, NOW(),'$jobdesc ')")
How do I add an hour to NOW() ?
adddate(now(), INTERVAL 1 HOUR)
adddate() and subdate() are very useful functions.
I tried NOW+60*60, but it adds 37 minutes, which makes no sense at all.
What you got makes plenty of sense if you expand it out and treat
the result AS INTEGERS (not dates). You don't want to add dates
like this. Carries from seconds to minutes, minutes to hours, hours
to days, days to months, and months to years don't work right.
23:30:53 October 4, 2005
20051004233053 + 3600 = 20051004236653
Now interpret that as a date, and you get 23:66:53 October 4, 2005 .
Doesn't look like a valid date, does it? You can also get such nice
things as October 86, 2005, and nonexistent months.
Gordon L. Burditt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Francis Avila |
last post by:
A few days ago (see the 'itertools.flatten()?' thread from October 28) I
became obsessed with refactoring a recursive generator that yielded the
leaves of nested iterables. When the dust settled, I had many flatten
functions at hand.
So I had to time them. Results below.
History of the functions (from flattrial.py):
# There are three basic features:
|
by: MCD |
last post by:
Hello, I'm new to python and this group and am trying to build some
bins and was wondering if any of you could kindly help me out. I'm a
bit lost on how to begin.
I have some text files that have a time filed along with 2 other fields
formatted like this >>
1231 23 56
1232 25 79
1234 26 88
|
by: Sheila King |
last post by:
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
>>> time.strftime("%Y-%m-%d", (Y, M, D, 0,0,0,0,0,0))
Traceback (most recent call last):
|
by: nospam |
last post by:
THIS IS the DOTNETJUNKIES MESSAGE
-------------------------
We're Sorry
As many of you know we have recently launched SqlJunkies.com. We have
overhauled our runtime and will be using it on DotNetJunkies.com also.
--------------------------------------------------------------------------
YEP, DOTNET JUNKIES REDESIGN....
|
by: William Wisnieski |
last post by:
Hello Everyone:
I'm having a very strange problem occurring with my Access 2000 database. I
call it the "mystery record."
Here's the story:
I have a query by form that returns a record set in a datasheet. The user
double clicks on a row in that datasheet and a main form (pop up) opens
bound to a table with a continuous subform bound to a query.
| |
by: maddman |
last post by:
I have an odd problem with my database, and was hoping someone could
point me at the problem.
We have an access database that is used by several people to input
data. Users have reported some of the records in their forms
(Datasheet view) are showing up as "#Deleted", though no one should be
deleting records from here. Further, the messages show up only on
certain users' screens.
Is this a result of corruption from having multiple...
|
by: christopher diggins |
last post by:
I have posted a C# critique at
http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up
the following issues :
- unsafe code
- attributes
- garbage collection
- non-deterministic destructors
- Objects can't exist on the stack
- Type / Reference Types
|
by: Marc Pelletier |
last post by:
Hello,
I am writing an application that does some simple astronomical
calculations. One of the variables I need is the number of hours passed in
this year. I've written the following function
public static double GetHoursofYear( DateTime aTime )
{
DateTime StartYear = new DateTime( aTime.Year, 1, 1 );
return ( aTime.ToOADate() - StartYear.ToOADate() ) * 24;
|
by: jojoba |
last post by:
Hi,
I hope this post is ok for this group.
Here's my deal:
I have two computers on my LAN at home.
One desktop. One laptop.
Both computers are wireless enabled (and wired enabled too).
I have running a fairly simple HTTP server (written in python) that i
|
by: maflatoun |
last post by:
Hi,
I have the following function to convert UTC time to Local time. It
works perfect for GMT- (Minus) time zones however it provides incorrect
results for GMT+(Plus) time zones?
// Format to local time from UTC
function formatToLocalTimeDate(inDate) {
var today = new Date();
var inDateMod = new Date(inDate);
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |