From: Martijn Tonies Date: October 12 2007 2:34pm Subject: Re: Trigger List-Archive: http://lists.mysql.com/mysql/209503 Message-Id: <021b01c80cdc$f40f21f0$9902a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit >Mostly because use 2 field to represent the same data is a waste of storage i think. Oh, ok. So you're sending a non-date value and you want to transform it into an actual character presentation of a date value, but making things easier on yourself is a waste of storage. Feel free to continu jumping through hoops and try to solve the problem down the line instead of right there at the beginning. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com > >The aplication which is writing to the database is sending the date > in unix > format. > >I can't no change that, so i suposse using a triger will help. > > > >The application pass the 'xxxxxx.xx' value when is inserting to the > table. > > Righto. Well, what does this mean then: > > >im converting the unixtime to "normal" time with from_unixtime. > >So after i did the convertion i write the result to the table. > >It works ok when i write to a varchar column, but not to a date > column > > Why not store the "unixtime" value and use an additional column to > store > an actual DATE value instead?