ore I posted, but it wasn't really clear to me, but I
think I need to use a DATETIME instead of a TIMESTAMP. Correct?
Yes.
As a highly-rated comment on StackOverflow puts it:
"Timestamps in MySQL generally used to track changes to records, and are
often updated every time the record is
On Tue, Mar 31, 2015 at 1:13 AM, Andrew Moore wrote:
> When you use a timezone with DST there is no such thing as 2.30am on the
> date of changeover. That hour doesn't exist.
I am using UCT - I am not using a timezone.
> Look up the difference between timestamp and datetime data types.
I did do
When you use a timezone with DST there is no such thing as 2.30am on the
date of changeover. That hour doesn't exist.
Look up the difference between timestamp and datetime data types.
A
On 31 Mar 2015 05:43, "Larry Martell" wrote:
> I have a column that was a timestamp type. I was inserting row
I have a column that was a timestamp type. I was inserting rows using
NOW(). When we switched to DST and the hour from 2am to 3am was
non-existent I of course had no data for that hour. For reasons I
don't need to go into, that missing hour caused problems downstream.
To prevent this from happening
> -Original Message-
> From: Dan Nelson [mailto:dnel...@allantgroup.com]
> Sent: Wednesday, September 29, 2010 2:26 PM
> To: Daevid Vincent
> Cc: 'MySQL'
> Subject: Re: INSERT DELAYED and created_on timestamps
>
> In the last episode (Sep 29), Daevi
In the last episode (Sep 29), Daevid Vincent said:
> I'm doing some reading on INSERT DELAYED
> http://dev.mysql.com/doc/refman/5.0/en/insert.html
>
> I have a user_log table:
>
> CREATE TABLE `user_log` (
> `id_user_log` bigint(20) unsigned NOT NULL auto_increment,
> `id_user` int(10) unsign
I'm doing some reading on INSERT DELAYED
http://dev.mysql.com/doc/refman/5.0/en/insert.html
I have a user_log table:
CREATE TABLE `user_log` (
`id_user_log` bigint(20) unsigned NOT NULL auto_increment,
`id_user` int(10) unsigned default '0',
`created_on` timestamp NOT NULL default CURRENT_T
On Wed, May 14, 2008 at 12:55 PM, Ed W <[EMAIL PROTECTED]> wrote:
> Rob Wultsch wrote:
>>
>> This sounds like expected behavior to me. If you set the timezone one
>> hour forward a timestamp will be one hour forward. The data stored on
>> the server is the same, and will display the same if you cha
Rob Wultsch wrote:
This sounds like expected behavior to me. If you set the timezone one
hour forward a timestamp will be one hour forward. The data stored on
the server is the same, and will display the same if you change the
timezone. The timezone setting when the insert occurred should have no
On Tue, May 13, 2008 at 11:56 PM, Ed W <[EMAIL PROTECTED]> wrote:
> Rob Wultsch wrote:
>>
>> On Tue, May 13, 2008 at 2:07 PM, Ed W <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I had naively assumed that dates would always be stored in UTC in the
>>> database and the only effect of localtime would be for
Rob Wultsch wrote:
On Tue, May 13, 2008 at 2:07 PM, Ed W <[EMAIL PROTECTED]> wrote:
I had naively assumed that dates would always be stored in UTC in the
database and the only effect of localtime would be for display purposes?
Can anyone shed some light on what's happening here please?
On Tue, May 13, 2008 at 2:07 PM, Ed W <[EMAIL PROTECTED]> wrote:
> I had naively assumed that dates would always be stored in UTC in the
> database and the only effect of localtime would be for display purposes?
> Can anyone shed some light on what's happening here please?
"TIMESTAMP values are c
Hi, can anyone explain mysql 5.0.54 handling of replication between two
servers with inconstant /etc/localtime (but the same real clock time for
UTC)
On one server I inserted a new row with "created_at" and "updated_at" as
the same time. Server localtime is GMT+1, created col is a date,
upda
nyone found a workaround, or are we
>> left to go SIOH (hint OH stands for "our hat") :-}
>>
>> Later...
>> Michael
>>
>> -Original Message-
>> From: DePhillips, Michael P
>> Sent: Sun 7/17/2005 11:05 AM
>&g
one found a workaround, or are we
> left to go SIOH (hint OH stands for "our hat") :-}
>
> Later...
> Michael
>
> -Original Message-
> From: DePhillips, Michael P
> Sent: Sun 7/17/2005 11:05 AM
> To: mysql@lists.mysql.com
>
ysql@lists.mysql.com
Cc:
Subject: datetime/timestamps/4.1.12
Hello,
I just upgraded to 4.1.12 from 4.0.22 and my timestamps changed formats
to
%Y-%m-%d %H:%i:%s
So I added the following li
Hello,
I just upgraded to 4.1.12 from 4.0.22 and my timestamps changed formats to
%Y-%m-%d %H:%i:%s
So I added the following lime to my my.cnf file
datetime_format=%Y%m%d%H%i%s
Which is the format I prefer, I restart the server and my time stamps still
appear as
%Y-%m-%d %H:%i:%s
The
Hi,
I'll tell you what did my provider (http://www.claranet.fr ) to
upgrade from 3.23 to 4.1.
They setup a new server with new hardware and a clean new 4.1.11 on
it. Then I have available the old 3.23 and the new 4.1. They let me
the choice on which server, the DB are created. So the customer has
Hi!
I'm a hosting provider with several thousands of Mysql Databases under 4.0
version. I'm specially worried about TIMESTAMP format changes you did in
4.1. I'll have to update database server soon to have my systems updated.
I think that if i update my server version thousands of tables are
Hi!
I'm a hosting provider with several thousands of Mysql Databases under 4.0
version. I'm specially worried about TIMESTAMP format changes you did in
4.1. I'll have to update database server soon to have my systems updated.
I think that if i update my server version thousands of tables are
>
> > Hi there,
> >
> > I am having trouble converting a timestamp from mySQL to the US Format
> > mm/dd/. Can someone please help. I am also having trouble
> > converting -mm-dd into a normal mm/dd/ format as well.
A bit off-topic but,
if you are able to use Perl anytime during
Gary:
Am I looking at PHP's "date()" function? You are taking a timestamp
from a MySQL table and wanting to convert it into a US format. Is the
timestamp stored in your MySQL table a Unix timestamp or a MySQL
timestamp?
It's important to note that you can't take a MySQL timestamp and use
PHP's
Gary Mack wrote:
Hi there,
I am having trouble converting a timestamp from mySQL to the US Format mm/dd/. Can someone please help. I am also having trouble converting -mm-dd into a normal mm/dd/ format as well.
Normal format *is* -mm-dd.
I am using the following line of code:
d
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Monday 05 July 2004 06:07 pm, Gary Mack wrote:
> Hi there,
>
> I am having trouble converting a timestamp from mySQL to the US Format
> mm/dd/. Can someone please help. I am also having trouble converting
> -mm-dd into a normal mm/dd/
Hi there,
I am having trouble converting a timestamp from mySQL to the US Format mm/dd/.
Can someone please help. I am also having trouble converting -mm-dd into a normal
mm/dd/ format as well.
I am using the following line of code:
date('m/d/Y', $row10['modified']);
$row10[
"joe collins" <[EMAIL PROTECTED]> wrote:
> I see that
> LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW()
> when I use now() I get the database time but
> I have a webhost based in US (Pacific Time), however most database events
> will be generated from BST and this is the time zone I
I see that
LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW()
when I use now() I get the database time but
I have a webhost based in US (Pacific Time), however most database events
will be generated from BST and this is the time zone I want to use to
populate audit trail tables etc. I c
n set (0.00 sec)
**
Notice there is a 2003 (14-digit) timestamp included even though I
queried
the database for just timestamps greater than 200400 (14
digits).
I am stumped.
Can anyone tell me the simple reason why this is not working right?
Thanks
Ed
--
MySQL General Mailing List
For list
for just timestamps greater than 200400 (14 digits).
I am stumped.
Can anyone tell me the simple reason why this is not working right?
Thanks
Ed
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
wrote:
> Hello,
>
> Recently I've been needing high-resolution timestamps
> (year/month/day/hour/minute/seconds/microseconds) in MySQL (to store
> network packets, mmm). Is this a planned feature for MySQL in the
> future?
--
Joshua J. Kugler
Fairbanks, Alaska
Hello,
Recently I've been needing high-resolution timestamps
(year/month/day/hour/minute/seconds/microseconds) in MySQL (to store
network packets, mmm). Is this a planned feature for MySQL in the
future?
Cheers, Leon
--
Leon Brocard.http://www.astray.com/
sc
;>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 3/2/04, 1:29:59 PM, Mark Riehl <[EMAIL PROTECTED]>
wrote regarding RE: Load Data and Timestamps:
> Sorry for the confusion, maybe I wasn't clear in the question.
rather a skid in broadside, thoroughly used, totally worn, and
loudly proclaiming: "WOW! What a ride!"
-Original Message-
From: Mark Riehl [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 1:30 PM
To: [EMAIL PROTECTED]
Subject: RE: Load Data and Timestamps
Sorry for the
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 2:17 PM
To: Mark Riehl
Cc: [EMAIL PROTECTED]
Subject: Re: Load Data and Timestamps
An invalid datetime, or in your case, an empty value, will be set to the
nearest zero value representation.
>>&g
An invalid datetime, or in your case, an empty value, will be set to the
nearest zero value representation.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 3/2/04, 1:06:50 PM,
All - I'm running MySQL 4.0.13 under Red Hat 9.
I've defined a table, and the last column is a timestamp type.
+-+--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
+-+--+-
Jeremy wrote:
I've been looking though "MySQL" by Paul DuBois (second edition) and the
MySQL docs at http://www.mysql.com/doc/en/Date_and_time_functions.html
(and others).
I'm looking for a MySQL function that returns the unix time (second
since epoch), and there doesn't seem to be one.
UNIX_TI
On Tue, Feb 17, 2004 at 09:19:26PM -0500, Jeremy wrote:
> I've been looking though "MySQL" by Paul DuBois (second edition) and the
> MySQL docs at http://www.mysql.com/doc/en/Date_and_time_functions.html
> (and others).
UNIX_TIMESTAMP(NOW())
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux M
I've been looking though "MySQL" by Paul DuBois (second edition) and the
MySQL docs at http://www.mysql.com/doc/en/Date_and_time_functions.html
(and others).
I'm looking for a MySQL function that returns the unix time (second
since epoch), and there doesn't seem to be one.
Using a PHP script,
EMAIL PROTECTED]
[EMAIL PROTECTED]
-Original Message-
From: Egor Egorov [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 7:19 AM
To: [EMAIL PROTECTED]
Subject: Re: timestamps and time zones
"2Hosts.com" <[EMAIL PROTECTED]> wrote:
> Bearing in mind the internationa
"2Hosts.com" <[EMAIL PROTECTED]> wrote:
> Bearing in mind the international nature of the internet, how do I make a
> timestamp local to the user rather than local to my webserver in Canada? If
> a user is adding a record to my database from England, I want the timestamp
> to be GMT rather than PS
Bearing in mind the international nature of the internet, how do I make a
timestamp local to the user rather than local to my webserver in Canada? If
a user is adding a record to my database from England, I want the timestamp
to be GMT rather than PST, and the same for my Australian clients, and s
Carl,
Monday, April 15, 2002, 11:29:10 PM, you wrote:
CM> One of our developers pointed out something to me today and I can't explain.
CM> When we created a table with timestamp as one of the column types and "not
CM> null" the "describe table" command shows that nulls are allowed for the
CM> tim
sql,query
One of our developers pointed out something to me today and I can't explain.
When we created a table with timestamp as one of the column types and "not
null" the "describe table" command shows that nulls are allowed for the
timestamp column. However, a "show create table" command shows
> It is not apparent from your question, where the problem lies. Why not
> show us what you have so far?
> SQL is used to retrieve data from relational databases. Are you really
> intending to retrieve FROM a web page?
Sorry, I meant that I am writing a PHP web page that takes input from a user
t
Hi Ben,
> I have a database table which includes a timestamp(14) field.
>
> I would like to construct an SQL statement that pulls out records
between
> two dates, based on this field (i.e. time is not important, date is).
>
> So a user input "01/01/2001" -> "01/01/2002" and I want to retrieve
all
Hi all,
I have a database table which includes a timestamp(14) field.
I would like to construct an SQL statement that pulls out records between
two dates, based on this field (i.e. time is not important, date is).
So a user input "01/01/2001" -> "01/01/2002" and I want to retrieve all
records t
the unlock).
So this answers my question, the value from the delayed temporary table is
used.
Thanks,
Viraj.
> -Original Message-
> From: Viraj Alankar [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 8:50 AM
> To: [EMAIL PROTECTED]
> Subject: insert delayed and t
What happened when you tried this experiment?
-Original Message-
From: Viraj Alankar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 8:50 AM
To: [EMAIL PROTECTED]
Subject: insert delayed and timestamps
Hello,
When using 'insert delayed' syntax and there is a times
Hello,
When using 'insert delayed' syntax and there is a timestamp field in the table
but not specified in the insert query, which timestamp is actually used when
the record ends up in the destination table? In other words, will the
timestamp value be the actual timestamp that the record was inse
t; // inserts in both t and u.
>
>
> Not that I want to get into an "aha! Gotcha!" thing, of course.
>
> P.S. The reason I went with TIMESTAMP instead of DATETIME is for storage
> efficiency (I'm logging millions of events into a table), but at the same
>
> Of course, the page lies somewhat: it says that if you omit the column in
> an insert, it should get set to now(), but the following example shows it
> doesn't - notice that "u" is omitted in the insert, but gets set to 0
> instead of now().
>
> >>create table foo (t timestamp, u timestamp);
t into an "aha! Gotcha!" thing, of course.
P.S. The reason I went with TIMESTAMP instead of DATETIME is for storage
efficiency (I'm logging millions of events into a table), but at the same
time, I'm logging different kinds of events to the table, and some have
additional
At 16:31 -0800 3/7/02, Shankar Unni wrote:
>Shankar Unni wrote:
>
>>I tried setting a TIMESTAMP column (nullable, not first timestamp
>>in that table) in mysql 3.23.38) to NULL, but it seems to get the
>>value 00. Is it not possible to set a timestamp column
>>to NULL?
>
>
>It's ev
Shankar Unni wrote:
> I tried setting a TIMESTAMP column (nullable, not first timestamp in
> that table) in mysql 3.23.38) to NULL, but it seems to get the value
> 00. Is it not possible to set a timestamp column to NULL?
It's even worse: if you explicitly insert the value NULL (
At 16:10 -0800 3/7/02, Shankar Unni wrote:
>I tried setting a TIMESTAMP column (nullable, not first timestamp in
>that table) in mysql 3.23.38) to NULL, but it seems to get the value
>00. Is it not possible to set a timestamp column to
>NULL?
It is not possible. Setting a TIMESTA
I tried setting a TIMESTAMP column (nullable, not first timestamp in that
table) in mysql 3.23.38) to NULL, but it seems to get the value
00. Is it not possible to set a timestamp column to NULL?
--
Shankar.
-
Bef
David,
My system (3.23.40-nt and MySQL-Front 1.18b as client) produces (what I think is) the
desired result using
both/either the NULL or NOW() alternatives - NOW (without function parentheses) is not
recognised.
However the INSERT statement below does not work without the addition of the VALU
My response below is incorrect, with regard to the NULL behavior. MySQL
will insert the current time and date for a TIMESTAMP only for the first
column *if* you omit the columns from the INSERT statement. If you set
the column to NULL explicitly, MySQL should set any TIMESTAMP to the current
dat
At 23:41 + 1/4/02, David Ayliffe wrote:
>I have created a test table with:
>
>CREATE TABLE TimeTest (
>Time1 TIMESTAMP(4),
>Time2 TIMESTAMP(8),
>Time3 TIMESTAMP(10),
>Time4 TIMESTAMP(12),
>Time5 TIMESTAMP(14));
>
>This works fine! No problemo
>
>Now ALL I am trying to do is insert the current
difference!
> Any other ideas?
>
> -Original Message-
> From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
> Sent: 05 January 2002 00:12
> To: David Ayliffe
> Cc: 'MySQL'
> Subject: Re: OK - Simple Timestamps problem getting the better of me!
>
> Did y
NO, not originally but I have now and it seems to make no difference!
Any other ideas?
-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
Sent: 05 January 2002 00:12
To: David Ayliffe
Cc: 'MySQL'
Subject: Re: OK - Simple Timestamps problem getting the be
Did you define the columns as NOT NULL?
Bogdan
David Ayliffe wrote:
> I have created a test table with:
>
> CREATE TABLE TimeTest (
> Time1 TIMESTAMP(4),
> Time2 TIMESTAMP(8),
> Time3 TIMESTAMP(10),
> Time4 TIMESTAMP(12),
> Time5 TIMESTAMP(14));
>
> This works fine! No problemo
>
> Now ALL I a
I have created a test table with:
CREATE TABLE TimeTest (
Time1 TIMESTAMP(4),
Time2 TIMESTAMP(8),
Time3 TIMESTAMP(10),
Time4 TIMESTAMP(12),
Time5 TIMESTAMP(14));
This works fine! No problemo
Now ALL I am trying to do is insert the current time and date into each
field in the table!! That's al
message
>Content-Transfer-Encoding: 7bit
>
>Subject: Innodb and timestamps
>From: Noel Clarkson <[EMAIL PROTECTED]>
>To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>Date: Thu, 28 Jun 2001 12:10:12 +1000
>Organization: UCA
>
>Hi there,
>
>I'm us
Hi there,
I'm using MaxSQL 3.23.39 and have set up an innodb table but when I run an
update statement the timestamp field does not update automatically. Is
anyone else experiencing this, or is it an expected behaviour of innodb
tables? I couldn't find anything in the manual saying that this
her function that returns the difference in
time b/w two MySQL timestamps. You should be able to easily modify the
first function to suit your needs. You can find both at
http://www.befriend.com/code_gallery/php/get_elapsed_time/.
--
Steve Werby
President, Befriend Internet Services LL
would anyone out there know how to use PHP to turn a MySQL Timestamp (not datetime)
into a UNIX timestamp. using PHP. I know there is the UNIX_TIMSTAMP(feild) query, but
that would be a huge pain to go and edit the queries. I guess this really counts as a
PHP question, but maybe someone here kn
Am I posting to the right list? I'm new to this thing.
Anyway, I have an interesting, though I think not unusual predicament.. I'm
maintaining a number of different tables that contain timestamp fields that
keep track of the last time a record was modified. My problem is that if I
want to chan
Why don't you :
select timestampfield from mytable order timestampfield decs limit 1
Jay Lawrence wrote:
>
> Atle, your suggestion is for the last time a record was updated. I am
> interested in the entire table.
>
> The closest that I have seen thus far is:
> SHOW TABLE STATUS
> The Update
On Thu, 15 Feb 2001, Jay Lawrence wrote:
> Atle, your suggestion is for the last time a record was updated. I am
> interested in the entire table.
A temporary workaround could be select max(timestamp) from sometable.
Jan
-
Be
Atle, your suggestion is for the last time a record was updated. I am
interested in the entire table.
The closest that I have seen thus far is:
SHOW TABLE STATUS
The Update_time field is most likely what I am after.
However I was hoping to do something more like
select Update_time from
You might be able to use this, depending on your needs:
from http://www.mysql.com/doc/D/A/DATETIME.html
[snip]
Automatic updating of the first TIMESTAMP column occurs under any of the
following conditions:
The column is not specified explicitly in an INSERT or LOAD DATA INFILE
statement.
The c
Hey all,
Is there a way to quickly obtain the last time a table was updated/touched?
In my app I am caching queries so long as the table data has not changed. I'd like a
quick check to see if a table has changed since the query was first executed. My
perusal of documentation plus a few searche
74 matches
Mail list logo