انا عندي قريد فيو فيها تاريخين وعمود يحسب الفرق بين التاريخين انا عندي الفورمات M/d/yyyy
انا استخدم هذا الكود لحساب الفرق
For Each Row As GridViewRow In GridView1.Rows
If DateDiff("h", Row.Cells(3).Text, Row.Cells(4).Text) > "24" Then
Row.Cells(5).Text = DateDiff("d", Row.Cells(3).Text, Row.Cells(4).Text) & " Days"
ElseIf DateDiff("h", Row.Cells(3).Text, Row.Cells(4).Text) < "24" And DateDiff("n", Row.Cells(3).Text, Row.Cells(4).Text) > "59" Then
Row.Cells(5).Text = DateDiff("h", Row.Cells(3).Text, Row.Cells(4).Text) & " Hours"
ElseIf DateDiff("n", Row.Cells(3).Text, Row.Cells(3).Text) < "59" And DateDiff("s", Row.Cells(3).Text, Row.Cells(4).Text) > "59" Then
Row.Cells(5).Text = DateDiff("n", Row.Cells(3).Text, Row.Cells(4).Text) & " Minutes "
ElseIf DateDiff("s", Row.Cells(3).Text, Row.Cells(4).Text) < "59" Then
Row.Cells(5).Text = DateDiff("s", Row.Cells(3).Text, Row.Cells(4).Text) & " Seconds "
End If
Nextالكود شغال معي تمام التمام بس المشكلة ظهرت لما غيرت الفورمات الى dd/MM/yyyy
غيرتها لكل الاعمده
المشكلة الغريبة لما اشغل البرنامج عن طريق vb
يشتغل تمام
بس لما اشغله عن طريق IIS يظهر خطأ
لا ادري لماذا