Query :: Finding Date Difference

Query :: Finding Date Difference

am 26.09.2009 11:10:23 von bharani kumar

--0016368e230e44178c0474776fe9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

courier_id consignor_name consignor_address consignor_destination
consignor_phone
consignee_name consignee_address consignee_destination consignee_phone s_da=
te
s_date_mm s_date_ss r_date r_date_mm r_date_ss consignment_description
no_packages
weight frieght_charges loading_charges unloading_charges tax amount
remarks courier_status
user_id consignor_email consignee_email status [image:
Edit] ls_tbl&token=3Ddc325199a0d6782e1a4bbb6f96ec0ff8&primary_key= 3D+%60courier_d=
etails_tbl%60.%60courier_id%60+%3D+1&sql_query=3DSELECT+%2A+ FROM+%60courier=
_details_tbl%60&goto=3Dsql.php>
[image:
Delete] l&token=3Ddc325199a0d6782e1a4bbb6f96ec0ff8&sql_query=3DDELET E+FROM+%60couri=
er_details_tbl%60+WHERE+%60courier_details_tbl%60.%60courier _id%60+%3D+1+LI=
MIT+1&zero_rows=3DThe+row+has+been+deleted&goto=3Dsql.php%3F db%3Dseva360%26=
table%3Dcourier_details_tbl%26token%3Ddc325199a0d6782e1a4bbb 6f96ec0ff8%26sq=
l_query%3DSELECT%2B%252A%2BFROM%2B%2560courier_details_tbl%2 560%26zero_rows=
%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.p hp>
1 gfdsgdfs gdfsgsdf gdfsg 43534 gdfsg gfdsgs gfdsgdf 5435345 2009-10-02 05
15 0000-00-00 fadsfads 33 23 23 2 3 3 32 1 1 0 [image: With
selected:]


Hi All ,

Above is my table structure , table name is
*details_tbl rier_details_tbl&token=3Ddc325199a0d6782e1a4bbb6f96ec0ff8>
*
_tbl&token=3Ddc325199a0d6782e1a4bbb6f96ec0ff8>

Am working in courier project ,

Once the goods despatch , then we show the staus as sent ,

Assume if user , track the courier after 30 day's ,

Then i have to show the message contact admin ,

If they tried with in 30 days , then i have to show message , like courier
SENT / PEND / FAILED ,


Can u please tell the query ,

If the *r_date *(recive date) greater then of 30 days , they i have to sho=
w
message like contact admin....


Please tell the query ,

Thanks

--0016368e230e44178c0474776fe9--

Re: Query :: Finding Date Difference

am 27.09.2009 17:35:06 von Colin Streicher

On September 26, 2009 05:10:23 am bharani kumar wrote:
> courier_id consignor_name consignor_address consignor_destination
> consignor_phone
> consignee_name consignee_address consignee_destination consignee_phone
> s_date s_date_mm s_date_ss r_date r_date_mm r_date_ss
> consignment_description no_packages
> weight frieght_charges loading_charges unloading_charges tax amount
> remarks courier_status
> user_id consignor_email consignee_email status [image:
> Edit] >bl&token=dc325199a0d6782e1a4bbb6f96ec0ff8&primary_key=+%60c ourier_details_tb
>l%60.%60courier_id%60+%3D+1&sql_query=SELECT+%2A+FROM+%60co urier_details_tbl
>%60&goto=sql.php> [image:
> Delete] >ken=dc325199a0d6782e1a4bbb6f96ec0ff8&sql_query=DELETE+FROM+ %60courier_detail
>s_tbl%60+WHERE+%60courier_details_tbl%60.%60courier_id%60+% 3D+1+LIMIT+1&zero
>_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dseva360% 26table%3Dcourier
>_details_tbl%26token%3Ddc325199a0d6782e1a4bbb6f96ec0ff8%26s ql_query%3DSELECT
>%2B%252A%2BFROM%2B%2560courier_details_tbl%2560%26zero_rows %3DThe%2Brow%2Bha
>s%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php> 1 gfdsgdfs gdfsgsdf gdfsg
> 43534 gdfsg gfdsgs gfdsgdf 5435345 2009-10-02 05 15 0000-00-00 fadsfads
> 33 23 23 2 3 3 32 1 1 0 [image: With selected:]
>
>
> Hi All ,
>
> Above is my table structure , table name is
> *details_tbl >_details_tbl&token=dc325199a0d6782e1a4bbb6f96ec0ff8> *
> >&token=dc325199a0d6782e1a4bbb6f96ec0ff8>
>
> Am working in courier project ,
>
> Once the goods despatch , then we show the staus as sent ,
>
> Assume if user , track the courier after 30 day's ,
>
> Then i have to show the message contact admin ,
>
> If they tried with in 30 days , then i have to show message , like courier
> SENT / PEND / FAILED ,
>
>
> Can u please tell the query ,
>
> If the *r_date *(recive date) greater then of 30 days , they i have to
> show message like contact admin....
>
>
> Please tell the query ,
>
> Thanks
Getting answers to your questions is easier if you can show you have done a
little backround work to try to find the answer.
Case in point:
http://lmgtfy.com/?q=datediff+in+mysql

Colin


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org