hi
my self andy, i am developing one application in vb 6 and sqlserver 7 as back end. i write one insert query for inserting one record. there is one voucherdate fied. to which i am passing my date value as a parameter. bu when i execute that query it stores 01/01/1999 instead of my pass data. plz give me some suggestion on this.
my query.
insert into voucher(voucherno,name,amount,Voucherdate)
values(" & txtvoucherno.text & ",'" & txtname.text & "'," & txtamount.text & ",'" & format(txtvoucherdate.text,"dd/mm/yyyy") & "')
out put
insert into voucher(voucherno,name,amount,Voucherdate)
values(1,'Andy',5000,'05/04/2004')
though here it show voucherdate '05/04/2004' but it stores in database as 01/01/1999.
my self andy, i am developing one application in vb 6 and sqlserver 7 as back end. i write one insert query for inserting one record. there is one voucherdate fied. to which i am passing my date value as a parameter. bu when i execute that query it stores 01/01/1999 instead of my pass data. plz give me some suggestion on this.
my query.
insert into voucher(voucherno,name,amount,Voucherdate)
values(" & txtvoucherno.text & ",'" & txtname.text & "'," & txtamount.text & ",'" & format(txtvoucherdate.text,"dd/mm/yyyy") & "')
out put
insert into voucher(voucherno,name,amount,Voucherdate)
values(1,'Andy',5000,'05/04/2004')
though here it show voucherdate '05/04/2004' but it stores in database as 01/01/1999.