anyone who can help, i dont know how to sort out the date in my database field...
one of my field is named data3 which contains this data :
05-03-09 ( 08:55:05 AM )
i used a function to get this data, the function is :
$Today = (date ("m-d-y ( h:i:s A )",time()));
my problem is how can i sort out the values of a specific date lets say
only the date 05-03-09 regardless of the time....
thanks!
sql query/syntax for date
Moderator: General Moderators
sql query/syntax for date
can you give me a hint on how to do that..... thanks!
is it like this one :
$date_month = date(m);
$date_year = date(Y);
$date_day = date(d);
$time_hour = date(H);
$time_min = date(i);
thanks!
is it like this one :
$date_month = date(m);
$date_year = date(Y);
$date_day = date(d);
$time_hour = date(H);
$time_min = date(i);
thanks!
sql query/syntax for date
meaning.. i have to insert the dates into seperate fields???
or is there any other way in which i can select the data in the table using query just to search for the part of the string in the field let say only
05-03-09...
like this one :
select * from tbl where data3 = '05-03-09';
i tried this one but but no results...
thanks!
or is there any other way in which i can select the data in the table using query just to search for the part of the string in the field let say only
05-03-09...
like this one :
select * from tbl where data3 = '05-03-09';
i tried this one but but no results...
thanks!
sql query/syntax for date
sir,
could you give me an example ofthe sql statement in inserting the date and time in different fields? i only do this one :
$query = "INSERT INTO tbl (userName,ip,data3) VALUES ('$user','$ip','$Today')";
the format of today is : $Today = (date ("m-d-y ( h:i:s A )",time()));
i could not query for the result if i am to sort the specific date....
thanks so much
could you give me an example ofthe sql statement in inserting the date and time in different fields? i only do this one :
$query = "INSERT INTO tbl (userName,ip,data3) VALUES ('$user','$ip','$Today')";
the format of today is : $Today = (date ("m-d-y ( h:i:s A )",time()));
i could not query for the result if i am to sort the specific date....
thanks so much