Hi ! How do i corectly insert a date typed in a form (E.g. : Birthday:"27-01-2004 " into a database field wich is set as "date"(yyy-mm-dd)"? Thanks!
You have to convert entered date to right format before inserting.
Zdenek
I have to do something because when i type : 27-01-2004 , in mysql i have 2027-01-........😕
You have to insert it as '2004-01-27'
INSERT INTO table ( column ) values ( '2004-01-27');
look into the [man]strtotime/man function this is a very versitile function. If all else fails you will just have to strip it apart using [man]substr/man function. Once stripped out into peices then just put it back together in the right order.
use now()
Originally posted by jannoy use now()
Dude, thats a VBScript function...
Can anyone show me how to use that? Thanks!
Use what?
if you mean [man]substr()[/man], click on the link. It'll take you to the PHP site, and more specifically to the page that tells you how to use the function.
Thanks piersk!