how to insert the date in ms access.date format like(dd/mm/yyyy).
by using this Format(#" + paydate + "#,'dd/MM/yyyy')
| PaymentDate |
|---|
| 07/10/2013 |
| 07/11/2013 |
| 07/12/2013 |
| 13/07/2013 |
| 14/07/2013 |
| 15/07/2013 |
but i need to insert all dates like dd/mm/yyyy.
Please help me.....
VulpesPosted Jul 15, 2013, 5:01 AM
Iftikar HussainPosted Jul 15, 2013, 1:33 AM
Regards,
Iftikar
prathyushaPosted Jul 15, 2013, 1:30 AM
current date like 15/07/2013 and i'm using windows applications
Iftikar HussainPosted Jul 15, 2013, 1:27 AM
Regards,
Iftikar
prathyushaPosted Jul 15, 2013, 1:20 AM
i = ts.DataManipulate("insert into tblFeePayment(AdmissionNumber,PaymentDate,AmountPaid,Balance,FeeDescription,FeeStatus,AcademicYearId,AdmissionFee,AnnualFee,LibraryFee,SportsFee,Others,MonthlyFee,Amountwords,TermFee) values('" + admnumber + "',#" + String.Format("{0:dd/MM/yyyy}", paydate) + "#," + amountpaid + "," + balance + ",'" + remarks + "'," + feestatus + "," + academicyearid + "," + admf + "," + annualfee + "," + libfee + "," + sportfee + "," + miscfee + "," + monfee + ",'" + amt + "'," + test1 + ")");
07/10/2013 output like this only
please help me
Iftikar HussainPosted Jul 15, 2013, 1:10 AM
Use like this
"#" + String.Format("{0:dd/MM/yyyy}", paymentDate) + "#"
Regards,
Iftikar
prathyushaPosted Jul 15, 2013, 12:49 AM
public int InsertStudentFee(string admnumber, string paydate, int amountpaid, int balance, string remarks, int feestatus, int academicyearid, int admf, int annualfee, int libfee, int sportfee, int miscfee, int monfee, string amt, int test1)
{
int i = 0;
Transaction ts = new Transaction();
i = ts.DataManipulate("insert into tblFeePayment(AdmissionNumber,PaymentDate,AmountPaid,Balance,FeeDescription,FeeStatus,AcademicYearId,AdmissionFee,AnnualFee,LibraryFee,SportsFee,Others,MonthlyFee,Amountwords,TermFee) values('" + admnumber + "',#" + paydate.ToString("dd/MM/yyyy") + "#," + amountpaid + "," + balance + ",'" + remarks + "'," + feestatus + "," + academicyearid + "," + admf + "," + annualfee + "," + libfee + "," + sportfee + "," + miscfee + "," + monfee + ",'" + amt + "'," + test1 + ")");
return i;
}
by using above query in windows application(forms) this eror will be displayed
Error19The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid argumentsC:\Users\dev02.QGNDOR\Desktop\QGS_School\BussinessLogic\BL_Student.cs563264BussinessLogic
Error20Argument '1': cannot convert from 'string' to 'System.IFormatProvider'C:\Users\dev02.QGNDOR\Desktop\QGS_School\BussinessLogic\BL_Student.cs563281BussinessLogic
please help me
it's important to me.
VulpesPosted Jul 13, 2013, 6:10 AM
prathyushaPosted Jul 13, 2013, 4:34 AM
my query like this in windows application
i = ts.DataManipulate("insert into
tblFeePayment(AdmissionNumber,PaymentDate,AmountPaid,Balance,FeeDescription,FeeStatus,AcademicYearId,AdmissionFee,AnnualFee,LibraryFee,SportsFee,Others,MonthlyFee,Amountwords,TermFee)
values('" + admnumber + "',Format(#" + paydate + "#,'dd/MM/yyyy')," + amountpaid + "," + balance + ",'" + remarks + "'," + feestatus + "," + academicyearid + "," + admf + "," + annualfee + "," + libfee + "," + sportfee + "," + miscfee + "," + monfee + ",'" + amt + "'," + test1 + ")");
please help me
VulpesPosted Jul 13, 2013, 4:08 AM
Sanjeeb LenkaPosted Jul 13, 2013, 4:02 AM
http://allenbrowne.com/ser-36.html