Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2004, 01:05 AM
Authorized User
 
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Time & date insert and display in myql/asp page

I have a site with asp pages-mysql database. I have constructed pages for insert, update, delete records with the built-in

application objects of Dreamweaver.

The site displays some records based on the date I have inserted.
I insert the date as following: year/month/day.

Now I am thinking of being able to insert some records based not only in date but in time additionally.

How can I insert date and time successfully to a record, so the page I want would display the record the specific time I

have already given? Something like year/month/day & [time]?

 
Old June 30th, 2004, 01:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What datatype are you using for that column? If you use DATETIME datatye, that has got timestamp included with it.

(YYYY-MM-DD HH:MM:SS)

That should help you.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old June 30th, 2004, 03:36 AM
Authorized User
 
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response.

Seems to work! I am testing it.

When I give only date and no time, it is supposed to be the 24:00:00, the beginning of the new day?



 
Old June 30th, 2004, 05:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its actually 00:00:00, but essentially, yes, that's correct.

Take it easy,
Dan





Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Date & Time RICHBIRD Beginning VB 6 3 November 15th, 2007 08:59 AM
Display current date and time in a webform TextBox cesemj ASP.NET 2.0 Basics 4 October 22nd, 2007 04:07 PM
store insert/update date/time stamp in sql2k db alexdcosta ASP.NET 2.0 Basics 0 June 22nd, 2006 05:44 AM
Date Time - From & To Passing shrishankaraan Crystal Reports 0 May 26th, 2004 10:28 PM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.