Does anyone know how to record times or dates in a column in a table? I have a table that the first column is an id column that is auto incremented, then I have another column that I want a date recorded for every row that is inserted into the table I've tried timestamp and DATETIME using the mysql reference but haven't gotten it to work yet?
Timestamp is your only date option it comes in different flavours timestamp timestamp(2) timestamp(4) timestamp(8) timestamp(12) timestamp(14) 2: 2 digit year representation 4: yymm 8: yyyymmdd 12: yyyymmddhhmm 14: yyyymmddhhmmss got it?
------------------ KaReEm
<b><i>KaReEm</i><br /><ul type="square"><li>SCJP-Free Range Web Developer <br /></ul></b>
Sean Casey
Ranch Hand
Joined: Dec 16, 2000
Posts: 625
posted
0
Thanks for your reply. I know all the versions of TimeStamp, I just can't get them to work in a column. When I try to designate it. It comes up 000000 instead of giving a date.
Originally posted by Sean Casey: Thanks for your reply. I know all the versions of TimeStamp, I just can't get them to work in a column. When I try to designate it. It comes up 000000 instead of giving a date.
what is the code that is giving you the undesired results?
Sean Casey
Ranch Hand
Joined: Dec 16, 2000
Posts: 625
posted
0
This is the SQL statement I'm using: ALTER TABLE users MODIFY regDATE TIMESTAMP(12);
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.