Re: time stamp specific to columns

2015-04-14 Thread hsv
On 2015/04/09 13:42, Michael Dykman wrote: A trigger is far simpler than remodelling your data and adding extra queries. They are nothing to be afraid of. Not afraid of, but to be careful when writing. I have had trouble with my triggers, because I left this&that out. As for timestamping, MyS

Re: time stamp specific to columns

2015-04-09 Thread Michael Dykman
A trigger is far simpler than remodelling your data and adding extra queries. They are nothing to be afraid of. On Thu, Apr 9, 2015 at 10:46 AM, wrote: > On 2015/04/08 11:42, Andrew Wallace wrote: > >> I think you'd have to do that with a trigger. >> > > Yes, one can do that with a trigger, but

Re: time stamp specific to columns

2015-04-09 Thread hsv
On 2015/04/08 11:42, Andrew Wallace wrote: I think you'd have to do that with a trigger. Yes, one can do that with a trigger, but it is a real pain. MySQL now allows (new.a,new.b,new.c,new.d) <> (old.a,old.b,old.c,old.d) but one needs to beware of NULL. Maybe it is better to split off t

Re: time stamp specific to columns

2015-04-08 Thread Emil Oppeln-Bronikowski
W dniu 08.04.2015 o 17:42, Andrew Wallace pisze: I think you'd have to do that with a trigger. +1 for using triggers. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: time stamp specific to columns

2015-04-08 Thread Andrew Wallace
I think you'd have to do that with a trigger. On 4/8/15 6:36 AM, Martin Mueller wrote: I understand how a timestamp column automatically changes when there is a change in a data row. Is it possible to limit the update to changes in particular columns? I have a table where I care about changes i

Re: TIME variable issue

2009-01-29 Thread Martijn Tonies
We are using TIME for calculating SLA and this sometimes involves a years time to hold in the time variable. Please suggest an alternative. Define a proper "interval"-like construct?? TIME should be used for "time of day", even though MySQL supports storing more in it, doesn't mean it's a goo

Re: time zone

2008-10-15 Thread Mr. Shawn H. Corey
On Wed, 2008-10-15 at 12:08 -0400, Olaf Stein wrote: > You can use the convert_tz function for this > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function > _convert-tz > > On 10/15/08 12:03 PM, "Madan Thapa" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > Can we make adjus

Re: time zone

2008-10-15 Thread Olaf Stein
You can use the convert_tz function for this http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function _convert-tz On 10/15/08 12:03 PM, "Madan Thapa" <[EMAIL PROTECTED]> wrote: > Hi, > > Can we make adjustments in mysql or php code to display time in php sites > in EST , alt

RE: Time Zone Support

2008-08-27 Thread Martin Gainty
you'll need to set the datetime function before presenting date/time to the user http://www.w3schools.com/php/func_date_default_timezone_set.asp Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to th

RE: time taken by mysqldump

2007-05-24 Thread Tim Lucia
believe.) BTW, we run the dump off the slave only. HTH, Tim > -Original Message- > From: Ananda Kumar [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 24, 2007 3:49 AM > To: B. Keith Murphy > Cc: MySQL General > Subject: Re: time taken by mysqldump > > Hi Keith, >

Re: time taken by mysqldump

2007-05-24 Thread Ananda Kumar
Hi Keith, I will be doing this from my slave database. Any rough estimate of time for 100gb mysqldump. regards anandkl On 5/24/07, B. Keith Murphy <[EMAIL PROTECTED]> wrote: Have you considered replicating to a backup server and then dumping from it? No matter your processors with a 100gb db

Re: time taken by mysqldump

2007-05-24 Thread B. Keith Murphy
Have you considered replicating to a backup server and then dumping from it? No matter your processors with a 100gb db it is going to take a significant amount of time. Keith Ananda Kumar wrote: Hi All, We have database of around 100GB, and planning to take dump using mysqldump. Can you

Re: Time of entry updates?

2006-06-14 Thread Brent Baisley
You need to have a field in your table that is a timestamp. The first field that is a timestamp field will always have the most recent modification date & time. http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html - Original Message - From: "Thomas Amundsen" <[EMAIL PROTECTED]> To

Re: time zones

2005-04-28 Thread Monty Harris
> How does one cope with time zones? For example, if I want to timestamp a > record it will timestanp using the local time of my server. I thought that, > e.g if my server was in New York and my customer_location was the UK, I can > just add 5 hours to the time and it would be correct. > While th

Re: time zones

2005-04-28 Thread Gleb Paharenko
Hello. The good support of timezones is on TODO list. See: http://dev.mysql.com/doc/mysql/en/todo-future.html "Monty Harris" <[EMAIL PROTECTED]> wrote: > How does one cope with time zones? For example, if I want to timestamp a > record it will timestanp using the local time of my

Re: TIME Difference Using 4.0.17

2005-04-07 Thread Jigal van Hemert
From: "shaun thornburgh" > I have a DATETIME COLUMN in my table and i need to be able to perform an > update on all colmns that are 48 hours old as specified in that column. As I > am using 4.0.17 I am unable to use the TIME() functions, is there another > way to do this? I tend to use constructio

Re: TIME Difference Using 4.0.17

2005-04-07 Thread Philippe Poelvoorde
shaun thornburgh wrote: Hi, I have a DATETIME COLUMN in my table and i need to be able to perform an update on all colmns that are 48 hours old as specified in that column. As I am using 4.0.17 I am unable to use the TIME() functions, is there another way to do this? Thanks for your help try d

Re: Time to be shown with query result

2005-03-09 Thread Gleb Paharenko
Hello. I'm not a developer, I've just looked through the code with vim (gdb had helped me a lot also). Kenji HIROHAMA <[EMAIL PROTECTED]> wrote: > Hi Gleb, > Thanks for your help. > (I'm sending again, because first I just sent this only to you to use > "Reply" of Gmail, not use "Reply

Re: Time to be shown with query result

2005-03-08 Thread Kenji HIROHAMA
Hi Gleb, Thanks for your help. (I'm sending again, because first I just sent this only to you to use "Reply" of Gmail, not use "Reply to all".) Well, is "end_timer" calculating the time? -- static void end_timer(ulong start_time,char *buff) { nice_time((double) (start_timer() - start_time

Re: Time to be shown with query result

2005-03-08 Thread Gleb Paharenko
Hello. The time is calculated at mysql client. This is a time of executing query and getting results. > and "nice_time" seemed to me that this function calculate the time. This function formats the time to human-readable format. Kenken PA <[EMAIL PROTECTED]> wrote: > Hi All,

Re: Time in VBA for Excel

2005-02-16 Thread Dan Wareham
Hi Dan, Sorry for causing additional work to getting the test setup, I will take your advice should I need to post these type of details again With regards to your solution, it works perfectly!!! Great thanks for putting the time and effort in to help sort this problem. Much appreciated. I

Re: Time in VBA for Excel

2005-02-15 Thread Daniel Kasak
Dan Wareham wrote: Hey Dan, Thanks for the post and the code ideas. Unfortuantely I still can't get the thing to work even when trying the CONCAT and CAST functions. As per your request, here is the details of what I have got so far: I'm running MySQL 4.1.9 with MyODBC 3.51. The table in question

Re: Time in VBA for Excel

2005-02-15 Thread Dan Wareham
Hey Dan, Thanks for the post and the code ideas. Unfortuantely I still can't get the thing to work even when trying the CONCAT and CAST functions. As per your request, here is the details of what I have got so far: I'm running MySQL 4.1.9 with MyODBC 3.51. The table in question is the Users tabl

Re: Time in VBA for Excel

2005-02-14 Thread Daniel Kasak
Dan Wareham wrote: Hello, I have a table in my database with two fields set as Time types. The issue I seem to have is when I use an ADO connection in VBA for Excel to select the two fields. Instead of the expected format HH:MM:SS held within my recordset, I get the current date in the format DD

Re: time out factor ofMySQL

2004-08-09 Thread Egor Egorov
Mahesh S <[EMAIL PROTECTED]> wrote: > i'm developing a web based application under r-g linux 9 with MySQL 3.23.54a-11. i > have planned to upgrade it to 4.0.20. it seems that if i keep the current version of > MySQL running for more than 8 hrs, it times out with the web-server (tomcat 4.x) and

RE: time out factor ofMySQL

2004-08-09 Thread Greg . Cope
> > hi all, > > i'm developing a web based application under r-g linux 9 with > MySQL 3.23.54a-11. i have planned to upgrade it to 4.0.20. it > seems that if i keep the current version of MySQL running for > more than 8 hrs, it times out with the web-server (tomcat > 4.x) and dies out. due t

Re: time zone leap seconds

2004-08-05 Thread Jeff Mathis
i seemed to have gotten around it by manually sourcing the script to update the password field, which had the create table statements in it, and then loading time zones based on our system time zone files. the manual section on upgrading from 4.0 to 4.1 did explain this -- i just had to dig a l

RE: time zone leap seconds

2004-08-04 Thread Victor Pendleton
There is are five new time_% tables. You could install 4.1.3 in a clean area, export the tables and import the tables into the upgraded environment. You could also export your 4.0.x data and import this data into the newly created 4.1.3 environment. -Original Message- From: Jeff Mathis To

Re: time on tenth of secounds

2004-07-01 Thread Egor Egorov
"Matthias Eireiner" <[EMAIL PROTECTED]> wrote: > problem is, that I want to save the time with the fraction of seconds. > as far as I know MySQL is fine with something like "D HH:MM:SS.fraction", > but doesn't store the fraction. Is there anything that could fix that > problem? > I thought about a

Re: Time Zone

2004-01-10 Thread Roger Baklund
* Harald Fuchs [...] > > You could also store the number of halfhours. > > Nope. Chatham Island has an offset of +12.75 hours. Yeah, and Kathmandu is +5.75 hours. Better avoid customers from Chatham Island and Kathmandu, then... ;) Seriously, I have implemented a timezone system once, but we on

Re: Time Zone

2004-01-09 Thread Jochem van Dieten
Roger Baklund wrote: * Jochem van Dieten Functionally, I believe it is much cleaner as it abstracts the problem away from the developer. Especially around DST changes this can be an important issue. I agree again. But it doesn't answer my question... I suppose you can live without timezones untill

Re: Time Zone

2004-01-09 Thread Roger Baklund
* Jochem van Dieten > > Woudn't the "proper way" be the way that leads to a result you can live > > with? Of course support in the server would have been better, > > but why can you not use a mechanism as described above? > > Using AT TIME ZONE is the way supported by SQL:1999, which makes > it the

Re: Time Zone

2004-01-09 Thread Jochem van Dieten
Roger Baklund wrote: * Jochem van Dieten The proper way to program this would require MySQL to support the AT TIME ZONE construct, but I haven't found it on the MySQL roadmap yet. Woudn't the "proper way" be the way that leads to a result you can live with? Of course support in the server would ha

Re: Time Zone

2004-01-09 Thread Roger Baklund
* Jochem van Dieten [...] > > The $usertimezone contains an integer between -12 and +12, > > representing the offset in hours of the user timezone compared > > to the server timezone. A user in the same timezone as the > > server would have $usertimezone=0. > > Some locations have timezone offsets

Re: Time Zone

2004-01-09 Thread Jochem van Dieten
Roger Baklund wrote: The date/time returned by the server is in the timezone of the server. If you need to convert it to a different timezone, you must do this within your application. It can be done directly in the SELECT statement. PHP example: $usertimezone = get_user_prefs('timezone'); $res = m

Re: Time Zone

2004-01-09 Thread Roger Baklund
* Hassan Shaikh > How do I change datetime from one time zone to another? I've a > column in one of my tables having the type DATETIME and I need to > show date AND time to end-user based on his/her preference. The date/time returned by the server is in the timezone of the server. If you need to c

RE: Time series

2004-01-02 Thread Tobias Asplund
Fredrick Bartlett [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 01, 2004 10:12 PM > To: Schulman, Michael; [EMAIL PROTECTED] > Subject: Re: Time series > > > Is Hour a DateTime? If so, will this work... > > SELECT ticker, DATE_FORMAT(Hour,'%H' ), min(pric

RE: Time series

2004-01-02 Thread Chris
od, though I've only used it on a 100,000 row table. It can get a little hairy writing the queries though. Chris -Original Message- From: Schulman, Michael [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 7:14 PM To: 'Fredrick Bartlett'; [EMAIL PROTECTED] Subject: RE:

Re: Time series

2004-01-01 Thread Bob Terrell
on 1/1/04 9:59 PM, Schulman, Michael wrote: > That only returns one number.. what we are really looking for is something > like > > SELECT ticker, hour, first(price), last(price) from pricedata group by hour Well, if you're using MySQL 4.1+, you're in luck. A subquery should help. SELECT ticker

Re: Time series

2004-01-01 Thread Will Lowe
>> First: select * from table1 order by field1 asc limit 1 >> Last: select * from table1 order by field1 desc limit 1 > That only returns one number.. what we are really looking for is something And worse: as far as I can tell 3.22.x even if field1 is indexed, ONE of those queries is going to be

Re: Time series - Response....

2004-01-01 Thread Amanullah
Hi Mike, I'm working in a large Data Capture Division of Lason Inc. in India, I have developed a Database which is used to report Server Load & Server space utilization online, I'm designing this layout with some what critical process. It's not in millian rows per day, but in thousands... al

RE: Time series

2004-01-01 Thread Schulman, Michael
ve is trying to do. Thanks again, Mike -Original Message- From: Fredrick Bartlett [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 10:12 PM To: Schulman, Michael; [EMAIL PROTECTED] Subject: Re: Time series Is Hour a DateTime? If so, will this work... SELECT ticker, DATE_F

Re: Time series

2004-01-01 Thread Fredrick Bartlett
;[EMAIL PROTECTED]> To: "'Fredrick Bartlett'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:59 PM Subject: RE: Time series > That only returns one number.. what we are really looking for is something > like > > SELECT ticker

RE: Time series

2004-01-01 Thread Schulman, Michael
: Thursday, January 01, 2004 9:57 PM To: Schulman, Michael; [EMAIL PROTECTED] Subject: Re: Time series Hmmm... First: select * from table1 order by field1 asc limit 1 Last: select * from table1 order by field1 desc limit 1 - Original Message - From: "Schulman, Michael" <[EMAIL P

Re: Time series

2004-01-01 Thread Fredrick Bartlett
Hmmm... First: select * from table1 order by field1 asc limit 1 Last: select * from table1 order by field1 desc limit 1 - Original Message - From: "Schulman, Michael" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:47 PM Subject: Time series > Hi, > > I w

RE: Time consuming table regeneration: JAVA & MySQL

2003-11-12 Thread Victor Pendleton
You should determine where your bottlenecks are first. Are the updates on columns with keys? Can you disable the keys during the load? Are you using extended inserts? Is there available memory? What is the cpu doing? etc... -Original Message- From: karthikeyan [mailto:[EMAIL PROTECTED] Sen

Re: Time zones and grouping

2003-10-14 Thread Mikhail Entaltsev
Hi, If I understand you correctly the this query should help you: select date_format(date_add(DateTime, interval 7 hour), "%Y%m%d") as Date, count(1) from Table1 group by Date order by Date Best regards, Mikhail. - Original Message - From: "Graeme B. Davis" <[EMAIL PROTECTED]> To:

Re: time of query

2002-12-24 Thread Vitali Malicky
Hi, ladies and gentleman! Well, I have solved my problem, though it was not actually a problem, I just wanted things to look cool :) 1. Download "Time::HiRes" perl module http://search.cpan.org/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.39.tar.gz 2. Install it: "perl Makefile.PL; make; make test; ma

Re: time of query

2002-12-20 Thread Bill Lovett
I don't think MySQL can give you back the execution time via DBI, but you might be able to calculate something similar from the Perl side by calculating how long the script runs overall. Here's a good thread from perlmonks about how to do it: http://perlmonks.org/index.pl?node_id=35318 -bill

Re: time of query

2002-12-20 Thread Dan Nelson
In the last episode (Dec 20), Vitali Malicky said: > Glad to greet you all, ladies and gentelmen! > > I have written a dynamic web page in Perl to display some kind > of statistical information usefull for my company. > > My question: how can I get the time which MySQL returns after the query? >

Re: Time&Date in SQLServer7

2002-12-03 Thread gerald_clark
That is not the proper format for a date/time field. It should be CCYYMMDDHHMMSS as a number or 'CCYY/MM/DD HH:MM:SS' as a string. You may not use any other format for an insert/update. [EMAIL PROTECTED] wrote: Hi I am inserting a Time like 06:00 from my code to a Date/Time field in SQLServer7.

Re: Time&Date in SQLServer7

2002-12-03 Thread DL Neil
Sam, heads up! MySQL list members don't want this = spam! =dn - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 4:54 PM Subject: Time&Date in SQLServer7 > Hi > > I am inserting a Time like 06:00 from my code to a

Re: Time comparisons

2002-11-14 Thread Ray
your probably looking for curtime() CURTIME() CURRENT_TIME Returns the current time as a value in 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in a string or numeric context: mysql> select CURTIME(); -> '23:50:26' mysql> select

Re: Time caculations

2002-09-19 Thread Torbjørn Lindahl
now() will give current time and work in all contexts (unix timestamp or datetime forma) Try... delete from table_name where now()-user_login_time > interval 15 minute in this statment, user_login_time is the time the user logged in. Regards Torbjørn On Thu, 19 Sep 2002 [EMAIL PROTECTED] wrot

RE: time stamp

2002-08-28 Thread Steve Buehler
Thank you David Lopez and David Robley. That was what I was looking for. Here is how I used it. $date=getlastupdatetime(array("team_id" => $team_id, "season" => $season, "div_id" => $div_id)); echo "$date"; function getlastupda

RE: time stamp

2002-08-28 Thread Lopez David E-r9374c
Steve Try: SELECT MAX(field_timestamp) from table1; David > -Original Message- > From: Steve Buehler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 5:21 PM > To: mysql; PHP > Subject: time stamp > > > I am using PHP with MySQL and have a timestamp field in my db > table.

Re: time field query problems.

2002-07-29 Thread Benjamin Pflugmann
Hi. On Mon 2002-07-29 at 14:41:30 -0400, [EMAIL PROTECTED] wrote: > Sorry to repost but I typed in the wrong sql statement in my previous post. Ah. Okay. > For some reason the below statement is not working. Can anyone tell me why? > > Select EDIT_LOCK from ordmaster where EDIT_LOCK + INTERVAL

Re: Time-out Error

2002-05-29 Thread raviraj shetty
Hi I am using mysql 3.2133b, Sun Solaris 2.6, JHTML and Apache. I have been getting Time-out requesting db connectionUnable to connect to database server where url was jdbc:z1MySQL://localhost:3306 error whenever the JHTML is initialized for the first time. It works fine when i click on the refr

RE: time recording

2002-05-09 Thread Cal Evans
check freshmeat.net There are several time recording tools. You may find one that works for you. Some of them use MySQL as a backend and some don't. While The idea of using MySQL as the backend for a program like this is good, you can't do it with MySQL alone. (Well, and keep your sanity) =C=

Re: time

2002-04-25 Thread
Heya, one solution could be select DATE_FORMAT(date_time, '%T') from testtable; also check out EXTRACT which could help you for your other problem. http://www.mysql.com/doc/D/a/Date_and_time_functions.html EG - Original Message - From: "bob nt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECT

Re: time zones?

2002-04-14 Thread DL Neil
Hi everyone, Apologies, I'm coming very late into this conversation, but perhaps I can disperse some of the confusion... Rob's original question: * I'm curious about how MySQL deals with time zones. Our machines are located in the GMT time zone, and recently rolled over to British Standard Ti

Re: time zones?

2002-04-12 Thread Keith C. Ivey
I wrote: > Using UNIX_TIMESTAMP() on a > timestamp column will produce an epoch time (in seconds), but it > won't necessarily be the right epoch time, because of daylight saving > time (summer time) and possibly data that has moved from one time > zone to another. Actually the documentation

Re: time zones?

2002-04-12 Thread Keith C. Ivey
On 12 Apr 2002, at 14:01, Lance Uyehara wrote: > > On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > > UNIX_TIMESTAMP > > > > Maybe I'm missing something, but I don't think that's the answer. > > How does UNIX_TIMESTAMP() know whether the timestamp is in summer > > time (or even what time zone i

Re: time zones?

2002-04-12 Thread Lance Uyehara
> On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > > [EMAIL PROTECTED] wrote: > > > > It might be > > > worthwile to have some way of retreiving a timestamp as an epoch value in > > > addition to other fifty ways you can currently retrieve it. (If there > > > already is a way, I'd be thrilled to

Re: time zones?

2002-04-12 Thread Keith C. Ivey
On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > [EMAIL PROTECTED] wrote: > > It might be > > worthwile to have some way of retreiving a timestamp as an epoch value in > > addition to other fifty ways you can currently retrieve it. (If there > > already is a way, I'd be thrilled to hear about i

Re: time zones?

2002-04-12 Thread Russell E Glaue
We use a Network Time Server to keep the MySQL server in the right time. -RG On Fri, 12 Apr 2002, John Klein wrote: > > [EMAIL PROTECTED] wrote: > > > > As I understand it, the mysql TIMESTAMP type represents the time in your > > local timezone (the one your computer is using). > > > > This make

Re: time zones?

2002-04-12 Thread Lance Uyehara
> [EMAIL PROTECTED] wrote: > > > > As I understand it, the mysql TIMESTAMP type represents the time in your > > local timezone (the one your computer is using). > > > > This makes it problematic to use in timezones that have a summer/daylight > > savings time. All of the date arithmetic functions

Re: time zones?

2002-04-12 Thread John Klein
[EMAIL PROTECTED] wrote: > > As I understand it, the mysql TIMESTAMP type represents the time in your > local timezone (the one your computer is using). > > This makes it problematic to use in timezones that have a summer/daylight > savings time. All of the date arithmetic functions will yield

Re: time zones?

2002-04-12 Thread Erik Rantapaa
As I understand it, the mysql TIMESTAMP type represents the time in your local timezone (the one your computer is using). This makes it problematic to use in timezones that have a summer/daylight savings time. All of the date arithmetic functions will yield inaccurate results if one of the date

Re: time zones?

2002-04-12 Thread Bradley Brown
I would like to second this notion if I may. I was up until midnight (EST) last night trying to come up with the very same answers. I found no answers from either the online mailing list searches nor from the O'Reilly Mysql book... nor from the DBI book. This also makes it difficult when porting s

Re: time calculations

2002-03-23 Thread Sherzod B. Ruzmetov
Jim, I use Perl. But I was looking for an SQL function/query for doing that. If there isn't any, I welcome any suggestions though. Thanks On 23 Mar 2002, Jim Philips wrote: > Are you really looking for SQL to do this? Or do you need PHP functions > that will help you to achieve the same resu

Re: Time Weirdness

2001-12-24 Thread Amer Neely
> Is this a bug in MySQL 3.23.37? Could it have something to do with my OS > (OpenBSD 2.9)? Or am I doing something wrong with the statement "update > time_worked set total = start - finish;"? Umm. Don't you mean 'finish-start'? -- Amer Neely [EMAIL PROTECTED] Softouch Information Services: w

Re: Time Weirdness

2001-12-23 Thread Bogdan Stancescu
You must make sure you don't perform arithmetic differences between integer values such as "2000" representing 8:00 pm and "1945" representing 7:45 pm because that obviously would result in wrong values. For example 2000-1945=55, which is arithmetically correct but not the desired result if you wa

Re: Time Weirdness

2001-12-23 Thread Alex Kirk
I was using float...but even when I changed it to time, MySQL still gave me odd values on those rows. What type should I use? Alex Kirk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http

Re: Time Weirdness

2001-12-23 Thread Bogdan Stancescu
Depends on the column type -- what column type do you use for storing the time values? Bogdan Alex Kirk wrote: > Is this a bug in MySQL 3.23.37? Could it have something to do with my OS > (OpenBSD 2.9)? Or am I doing something wrong with the statement "update > time_worked set total = start - f

Re: Time Difference Function

2001-12-20 Thread Bogdan Stancescu
The solution I found for the same problem was arithmetic subtraction between unix_timestamp() values. Hope this helps. Bogdan Alex Kirk wrote: > I've been looking through the manual at www.mysql.com all of the time/date > functions, and I can't seem to find the one I want: one that will take t

Re: Time Difference Function

2001-12-20 Thread Alex Kirk
I've been looking through the manual at www.mysql.com all of the time/date functions, and I can't seem to find the one I want: one that will take two times and find the difference between them. Basically, I'd like to be able to use this for a report that gives the number of hours worked on a

Re: time grouping in mysql

2001-11-03 Thread Paul DuBois
At 9:02 AM -0500 11/3/01, Greg Sarsons wrote: >I haven't succeeded in being able to group by time. My timestamp field >is -mm-dd hh:mm:ss. What I would like is have a query that will >enable me to be to group on events say every 5 minutes. > >I've played around with using time_to_sec(timesta

RE: time calculate

2001-10-18 Thread Ravi Raman
hi. store the information in a datetime column for easy handling. check out the function DATE_ADD() or DATE_SUB() on this page: http://www.mysql.com/doc/D/a/Date_and_time_functions.html it has examples of usage that could be helpful. i would do something like this: select TO_DAYS(secondDate) -

Re: time and date

2001-05-25 Thread Alexander Skwar
So sprach chris am Tue, Apr 02, 2002 at 08:26:01PM -0500: ^ You're quite ahead of me, timewise *G* > Is there a way to store the time and date that a record was added within > MySQL? I want to show the time and date on some of my records and can't seem Add a D

Re: time and date

2001-05-20 Thread Alexander Skwar
So sprach chris am Tue, Apr 02, 2002 at 08:26:01PM -0500: > Is there a way to store the time and date that a record was added within > MySQL? I want to show the time and date on some of my records and can't seem > to figure out an easy way to do it. Thanks! Either use a TIMESTAMP column, which wi

Re: time and date

2001-04-12 Thread Alexander Skwar
So sprach chris am Tue, Apr 02, 2002 at 08:26:01PM -0500: > Is there a way to store the time and date that a record was added within > MySQL? I want to show the time and date on some of my records and can't seem > to figure out an easy way to do it. Thanks! Either add a timestamp column to your t

Re: time and date

2001-04-02 Thread Jason Brooke
Add a date/time column and dump the current time into it when you do an insert jason - Original Message - From: "chris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 11:26 AM Subject: time and date > Is there a way to store the time and date that a record

Re: time and date

2001-04-02 Thread Thalis A. Kalfigopoulos
Check the manual for the TIMESTAMP datatype. Will hold the last update time per record abd therefore the insert time that you want. regards, thalis -- No excellent soul is exempt from a mixture of madness. -- Aristotle On Tu

Re: time and date

2001-04-02 Thread Lindsay Adams
It's in the manual. Check the datatypes section, and the now() mysql function. On 4/2/02 6:26 PM, "chris" <[EMAIL PROTECTED]> wrote: > Is there a way to store the time and date that a record was added within > MySQL? I want to show the time and date on some of my records and can't seem > to figu

RE: Time function

2001-04-02 Thread Oson, Chris M.
rekha, mysql> select date_format(dateEntered, "%m-%d-%Y %H:%I") as dateEntered, -> date_format(date_add(dateEntered, interval 2 hour), "%m-%d-%Y %H:%I") as '2 Hours Later' -> from newsStories where storyID = 1122; +--+--+ | dateEntered | 2 Hours Later

Re: Time function

2001-04-02 Thread Steve Werby
"Rekha Das" <[EMAIL PROTECTED]> wrote: > What time function should I use to add 2 hours to a time value I am getting > from the database ? Convert the time to seconds, add 7200 seconds (2 hours), then convert back to time format. SELECT SEC_TO_TIME(TIME_TO_SEC(my_time_field) +7200); -- Steve We

Re: Time between two DATETIMEs

2001-02-20 Thread Atle Veka
You could use the UNIX_TIMESTAMP() function to easily determine the difference in seconds between the two dates. select UNIX_TIMESTAMP( Datetime_A ) ... and the do the time_a - time_b thing. there might be a simple query that will work as well, but I don't know the mysql date queries that good