Re: Hello! Date question....
At 18:49 +0100 2/8/02, Jim Hatridge wrote: >Hi all... > >This is my first post to the list. I've been working on MySQL now for about a >week and really like it. I have a question that I can't find in any of the >books or how-tos. > >When I add a line to my customer's table I need it to put today's date in the >"indate" column. Is there anyway to do this like the auto for numbers? > >Thanks! >-- >Jim Hatridge >Linux User #88484 I know of at least one book the answer's in: MySQL, page 110 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Hello! Date question....
See the manual reference to the 'timestamp' type. -Original Message- From: Jim Hatridge [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 5:50 PM To: [EMAIL PROTECTED] Subject: Hello! Date question Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date in the "indate" column. Is there anyway to do this like the auto for numbers? Thanks! -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hello! Date question....
Hi Jim, Welcome to our relatively?relationally happy band. > This is my first post to the list. I've been working on MySQL now for about a > week and really like it. I have a question that I can't find in any of the > books or how-tos. A whole week and no post... > When I add a line to my customer's table I need it to put today's date in the > "indate" column. Is there anyway to do this like the auto for numbers? You didn't mention which date format you are using. At this reference (6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types) you will find coverage of the automatic inserting/updating of TIMESTAMP values, and the equivalent for DATE/DATETIME values. Remember that the auto-input feature is a two-edged sword! Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Hello! Date question....
Jim,=20 What you're asking about is the "timestamp" data type. =20 Look at : http://www.mysql.com/doc/D/A/DATETIME.html In a nutshell, if you assign 'null' to a timestamp column it will put in value of 'NOW()'. Eric Mayers Software Engineer > -Original Message- > From: Jim Hatridge [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 08, 2002 9:50 AM > To: [EMAIL PROTECTED] > Subject: Hello! Date question >=20 > Hi all... >=20 > This is my first post to the list. I've been working on MySQL=20 > now for about a=20 > week and really like it. I have a question that I can't find=20 > in any of the=20 > books or how-tos. >=20 > When I add a line to my customer's table I need it to put=20 > today's date in the=20 > "indate" column. Is there anyway to do this like the auto for numbers? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Hello! Date question....
Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date in the "indate" column. Is there anyway to do this like the auto for numbers? Thanks! -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hello! Date question....
On Friday 08 February 2002 19:28, Eric Mayers wrote: > Jim, > > What you're asking about is the "timestamp" data type. > > Look at : http://www.mysql.com/doc/D/A/DATETIME.html > > In a nutshell, if you assign 'null' to a timestamp column it will put in > value of 'NOW()'. > > Eric Mayers > Software Engineer Hi Eric, This was what I was looking for, thanks! JIM -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hello! Date question....
Hi Jim, Welcome to our relatively?relationally happy band. > This is my first post to the list. I've been working on MySQL now for about a > week and really like it. I have a question that I can't find in any of the > books or how-tos. A whole week and no post... > When I add a line to my customer's table I need it to put today's date in the > "indate" column. Is there anyway to do this like the auto for numbers? You didn't mention which date format you are using. At this reference (6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types) you will find coverage of the automatic inserting/updating of TIMESTAMP values, and the equivalent for DATE/DATETIME values. Remember that the auto-input feature is a two-edged sword! Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Hello! Date question....
Jim, What you're asking about is the "timestamp" data type. Look at : http://www.mysql.com/doc/D/A/DATETIME.html In a nutshell, if you assign 'null' to a timestamp column it will put in value of 'NOW()'. Eric Mayers Software Engineer > -Original Message- > From: Jim Hatridge [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 08, 2002 9:50 AM > To: [EMAIL PROTECTED] > Subject: Hello! Date question > > Hi all... > > This is my first post to the list. I've been working on MySQL > now for about a > week and really like it. I have a question that I can't find > in any of the > books or how-tos. > > When I add a line to my customer's table I need it to put > today's date in the > "indate" column. Is there anyway to do this like the auto for numbers? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hello! Date question....
At 18:49 +0100 2/8/02, Jim Hatridge wrote: >Hi all... > >This is my first post to the list. I've been working on MySQL now for about a >week and really like it. I have a question that I can't find in any of the >books or how-tos. > >When I add a line to my customer's table I need it to put today's date in the >"indate" column. Is there anyway to do this like the auto for numbers? > >Thanks! >-- >Jim Hatridge >Linux User #88484 I know of at least one book the answer's in: MySQL, page 110 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Hello! Date question....
Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date in the "indate" column. Is there anyway to do this like the auto for numbers? Thanks! -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php