i am trying to add a date and a time to 2 columns in a table but i keep getting an error my code looks like this
Command.CommandText = "SELECT COUNT(*) FROM Sales"
Reader.Value = Command.ExecuteReader
Reader.ReadNextRow
OrderNo=Reader.GetValue(0)
Reader.Close
OrderNo=OrderNo+1
VanNo=1
Price=1
Amount=Qty*Price
GST=0
OrderDate = Date(Now)
OrderTime= Date(Now)
data1$=CustCode
The CustCode is a string variable but the only way the code would accept it is if i changed it to data1$
like this the code is accepted
StblOrders.AddRow (OrderNo,VanNo,data1$,ProductCode,Qty,"","",Amount,GST,0)
like this it is not
StblOrders.AddRow (OrderNo,VanNo,data1$,ProductCode,Qty,OrderDate,OrderTime,Amount,GST,0)
Sub App_Start
DateFormat("dd-mm-yyyy")
TimeFormat("HH:mm:ss")
end sub
can anyone help?
i have tried using dateformat but that does not work either
thanks
Command.CommandText = "SELECT COUNT(*) FROM Sales"
Reader.Value = Command.ExecuteReader
Reader.ReadNextRow
OrderNo=Reader.GetValue(0)
Reader.Close
OrderNo=OrderNo+1
VanNo=1
Price=1
Amount=Qty*Price
GST=0
OrderDate = Date(Now)
OrderTime= Date(Now)
data1$=CustCode
The CustCode is a string variable but the only way the code would accept it is if i changed it to data1$
like this the code is accepted
StblOrders.AddRow (OrderNo,VanNo,data1$,ProductCode,Qty,"","",Amount,GST,0)
like this it is not
StblOrders.AddRow (OrderNo,VanNo,data1$,ProductCode,Qty,OrderDate,OrderTime,Amount,GST,0)
Sub App_Start
DateFormat("dd-mm-yyyy")
TimeFormat("HH:mm:ss")
end sub
can anyone help?
i have tried using dateformat but that does not work either
thanks