Robert A. Rawlinson wrote:
I am having a problem doing an insert on a datetime field. Is there
something I have to use to convert it
to that form? I have it set up in a string as '2000/09/17 00:00:00'
but that does not seem to work.
Thanks for any help you can offer.
Bob Rawlinson
I am having a problem doing an insert on a datetime field. Is there
something I have to use to convert it
to that form? I have it set up in a string as '2000/09/17 00:00:00' but
that does not seem to work.
Thanks for any help you can offer.
Bob Rawlinson
--
MySQL General Mailing Lis
ype_no = 1 WHERE
> >> >DATE_FORMAT(activity_date,'%Y-%m-%d %H:%i:%s') = '2003-06-10
> >> >11:15:00' AND type_no = 1;
> >> >
> >> >I want to update only rows where equals
> >>'2003-06-10 11:15:00'
> >>
_FORMAT(activity_date,'%Y-%m-%d %H:%i:%s') = '2003-06-10
>11:15:00' AND type_no = 1;
>
>I want to update only rows where equals
'2003-06-10 11:15:00'
>Is this formulation correct?
>
> is really a DATETIME field.
>Thanks.
In that case
; AND type_no = 1;
> >
> >I want to update only rows where equals '2003-06-10 11:15:00'
> >Is this formulation correct?
> >
> > is really a DATETIME field.
> >Thanks.
>
> In that case, you don't need DATE_FORMAT() at all. Just compare activ
;
I want to update only rows where equals '2003-06-10 11:15:00'
Is this formulation correct?
is really a DATETIME field.
Thanks.
In that case, you don't need DATE_FORMAT() at all. Just compare activity_date
to the datetime value directly.
You still haven't indicated what you
quals '2003-06-10 11:15:00'
Is this formulation correct?
is really a DATETIME field.
Thanks.
--- Paul DuBois <[EMAIL PROTECTED]> wrote: > At 11:28 -0400 10/6/03, Franck Babin
wrote:
> >I have this simple sql statement:
> >
> >UDPATE activity
> >SET activity_d
e query. It seems that the
portion is not valid. is a DATETIME field.
Any idea?
What do you mean by "is not valid"? The comparison doesn't work? The
correct value doesn't get stored into the row?
In any case, if activity_date really is a DATETIME column, you must
store valu
your date format is not correct. It should be activity_date = '2003-9-10
10:00:00'.
-Original Message-
From: Franck Babin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 8:28 AM
To: [EMAIL PROTECTED]
Subject: Dummy problem with UPDATE for DATETIME field
I have this
I have this simple sql statement:
UDPATE activity
SET activity_date = '9.10.2003 10:00:00', type_no = 1
WHERE DATE_FORMAT(activity_date,'%d.%m.%Y %H:%i') = '09.10.2003 10:00'
AND type_no = 1;
I'm not able to execute the query. It seems that the
portion is n
Hi again,
> From: Diana Soares [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 4:05 PM
> | NOW() + sec_to_time(6000) |
That i allready tried, and it's leading to wrong results,
as same as
> From: Cybot [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 3:42 PM
> UPDATE `user
.
>
> Can you tell me, how to correctly add an amount of seconds (after that
> the session expires) to a datetime field?
>
> when i do the insert for a new login, or an update, the expire field
> will alway end up containing zeros
>
> below are my statements and structure,
M. Bader wrote:
Hi,
i'm struggling with updating session expire times in my login table.
Can you tell me, how to correctly add an amount of seconds (after that
the session expires) to a datetime field?
when i do the insert for a new login, or an update, the expire field
will alway e
Hi,
i'm struggling with updating session expire times in my login table.
Can you tell me, how to correctly add an amount of seconds (after that
the session expires) to a datetime field?
when i do the insert for a new login, or an update, the expire field
will alway end up containing
:is there a way to use the date part of a datetime field that
:still uses the
:index on the datetime field? i've tried a few different things
:and it keeps
:saying in the explain it says that its a possible_key, but
:NULL for the key
I'm not sure if this i
is there a way to use the date part of a datetime field that still uses the
index on the datetime field? i've tried a few different things and it keeps
saying in the explain it says that its a possible_key, but NULL for the key
--
mysql, sql, query, sql, sql
al Message -
From: "aman raheja" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 7:25 PM
Subject: comparision in the datetime field
Hi All
I have a datetime field in one of my tables in the MySQL database.
Can I do something li
At 15:07 +0200 1/4/03, Egor Egorov wrote:
On Friday 03 January 2003 19:25, aman raheja wrote:
I have a datetime field in one of my tables in the MySQL database.
Can I do something like return all records between two certain dates, say
between Nov 02, 2002 and Nov 07, 2002.
SELECT .. WHERE
On Friday 03 January 2003 19:25, aman raheja wrote:
> I have a datetime field in one of my tables in the MySQL database.
> Can I do something like return all records between two certain dates, say
> between Nov 02, 2002 and Nov 07, 2002.
SELECT .. WHERE mydatefield BETWEEN '2002-
Hi All
I have a datetime field in one of my tables in the MySQL database.
Can I do something like return all records between two certain dates, say
between Nov 02, 2002 and Nov 07, 2002.
Thanks
Aman
-
Before posting, please check
Hi, you can use a DateTime field, but it is possible to get duplicate
datetimes if you insert multiple queries fast enough.
At 04:17 PM 12/23/2002 -0200, João Borsoi Soares wrote:
I would like to use a datetime field as a key. I'm wondering if I will
have any problems with key violati
I would like to use a datetime field as a key. I'm wondering if I will
have any problems with key violation. I found in the document something
saying that timestamp fields are precise, like unix time, but I don't
want it to be changing on update. Does anyone has some experience with
i
select * from table where substring(timestampField,1,8) = 'MMDD'
from Perl, execute this statement and then process each returned row
- hcir
> My mysql database is set up having a field cdate
> -> cdate datetime
>
> has the format
>
> -00-00 00:00:00
>
> If I want to fetch rows for sa
Hi All
My mysql database is set up having a field cdate
-> cdate datetime
has the format
-00-00 00:00:00
If I want to fetch rows for say the date 2000-12-19, I do it using perl
(it's a tediuos code)
Is there a way to do it using sql queries
Also how can I get betwee two specific date that
From: "Anvar Hussain K.M." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 11 January 2002 04:05
Subject: Re: Date Field + Time Field = Datetime Field?
> Hi Alex,
>
> I don't think your problem will solved by making the time columns to full
> datetime c
Hi Alex,
I don't think your problem will solved by making the time columns to full
datetime columns as there is no
functions to subtract two datetime values directly.
But you can can keep the time columns and go on like this:
convert the time into seconds using time_to_sec function.
subtract f
I've been working with a timesheet database, where all the employees of my
small business enter in the hours they work on projects. I've been storing,
for each record, a date of work, a start time, and a finish time.
When I attempted to write a Perl script to display invoices, though, I ran
i
At 11:57 AM +0200 6/28/01, Kaneda K wrote:
>At 10:38 27/06/2001 -0700, you wrote:
>>Sorry, for quoting the manual but this might be just another example where
>>it could have the answer right away:
>>Hannes
>>
>>http://www.mysql.com/doc/D/A/DATETIME.html
>
>On my own mysql version :
> Date TIMEST
No. Since the string "now()" is not a valid date it is equivalent to 0,
so MySQL inserts the current date and time.
Kaneda K wrote:
> At 10:38 27/06/2001 -0700, you wrote:
>
>> Sorry, for quoting the manual but this might be just another example
>> where
>> it could have the answer right away
At 10:38 27/06/2001 -0700, you wrote:
>Sorry, for quoting the manual but this might be just another example where
>it could have the answer right away:
>Hannes
>
>http://www.mysql.com/doc/D/A/DATETIME.html
On my own mysql version :
Date TIMESTAMP default "now()",
Works correctly, the date is YY
Only the first timestamp is updated by MYSQL. Create two timestamp
fields. MySQL will maintain the first one. Set timestamp2 to null when
the record is created.
Regards,
Rich
At 10:54 AM 6/27/01 -0500, Pete Harlan wrote:
>TIMESTAMP is not the solution to his problem; he wants the date to
>
ilto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 2:10 PM
> To: Ravi Raman
> Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED]
> Subject: RE: Creating Table with a Default Datetime field
>
>
>
> Wait, I didn't get the following:
>
>
> &g
erzod Ruzmetov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 2:10 PM
To: Ravi Raman
Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED]
Subject: RE: Creating Table with a Default Datetime field
Wait, I didn't get the following:
> an alternate solution is to have a table like th
: Pete Harlan
> Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
> Subject: Re: Creating Table with a Default Datetime field
>
>
>
>
> I, c. Then you just have to INSERT INTO it NOW() manually, that works
>
>
> On Wed, 27 Jun 2001, Pete Harlan wrote:
>
>
-
From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 1:40 PM
To: Pete Harlan
Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
Subject: Re: Creating Table with a Default Datetime field
I, c. Then you just have to INSERT INTO it NOW() manually, that works
On Wed, 27
gt;> type?
>> you can then format the date accordingly with...uh...DATE_FORMAT() in your
>> select statements...
>>
>> hth.
>> -ravi
>>
>>
>> -Original Message-
>> From: Richard Bates [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, J
FORMAT() in your
> > select statements...
> >
> > hth.
> > -ravi
> >
> >
> > -Original Message-
> > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 3:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: Creating Tab
ck out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
>> type?
>> you can then format the date accordingly with...uh...DATE_FORMAT() in your
>> select statements...
>>
>> hth.
>> -ravi
>>
>>
>> -Original Message-
>> F
PM
> To: [EMAIL PROTECTED]
> Subject: Creating Table with a Default Datetime field
>
>
> How do I get a default date time in the create table clause...
>
> I have tried
>
> Create table(
> CreationDateDATETIMEDEFAULT NOW(),
> Infovarc
:00 PM
To: [EMAIL PROTECTED]
Subject: Creating Table with a Default Datetime field
How do I get a default date time in the create table clause...
I have tried
Create table(
CreationDateDATETIMEDEFAULT NOW(),
Infovarchar(100)
);
Create table(
CreationDate
How do I get a default date time in the create table clause...
I have tried
Create table(
CreationDateDATETIMEDEFAULT NOW(),
Infovarchar(100)
);
Create table(
CreationDateDATETIMEDEFAULT "NOW()",
Infovarchar(100)
);
Create table(
Creat
- Original Message -
From: "Jan Namedyński" <[EMAIL PROTECTED]>
To: "Rolf Hopkins" <[EMAIL PROTECTED]>
Cc: "mysql" <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 10:02
Subject: Re: deleting old records VS. index on datetime field (que
Rolf Hopkins wrote:
>
> That all depends.
>
> Do you need to keep the data for historical purposes?
I don't have to but I want ;-). it means that if speed difference would
be small I will.
Are your queries
> running particularly slowly? Have you read the manual about how you can
> optimize
wrong.
- Original Message -
From: "Jan Namedyński" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 21:09
Subject: deleting old records VS. index on datetime field (question about
optimization)
> Hi,
> I have a table
&g
Hi,
I have a table
DAY : DATETIME
CAT_ID : INT
DATA : TEXT
ID : INT
and I have to extract all records not older than 2 weeks with given
CAT_ID (sorted by DAY).
query for that is very simple, but what if this table has 1 000 000
records? Do you think that deleting records older than eg
In the last episode (Jan 21), Muhammad Farhan Ghazi said:
> How much space is taken by the datetime field?
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Storage_requirements
> Is there any way that we can only store date or time in it?
http://www.mys
How much space is taken by the datetime field?
Is there any way that we can only store date or time in it?
How we can seperate date and time from this field?
_
Get Your Private, Free E-mail from MSN Hotmail at http
How much space is taken by the datetime field?
Is there any way that we can only store date or time in it?
How we can seperate date and time from this field?
Regaards,
Ghazi, Muhammad Farhan
_
Get Your Private, Free E
48 matches
Mail list logo