hi...i really, really need help right now...i have order date and approve date..
1) my problem is, how i can calculate between those two date
2) code for checking insert date...for example, if the user enter yesterday date for order date, it will pop up an error and if the user enter a week before for approve date, it will also pop up an error...urgent...please....i'm using php and mysql and date format = "yyyy-mm-dd"
erza26 0
Newbie Poster
Recommended Answers
Jump to Post$order_date;//Order date $date=date('Y-m-d');//Gives the current date list($y, $m, $d) = split('[-]', $date); list($y1, $m1, $d1) = split('[-]', $order_date); if(($d1-$d)!=0 || ($m1-$m)!=0 || ($y1-$y)!=0){ echo "Order date is not correct"; }
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.