I have almost finished my checkbook app but I am stuck on a very simple thing.
how do I save a date and then get it back from SQL and display it.
I save it this way
lngDate = DateTime.Now
DateTime.DateFormat = "yyyy-MM-dd"
sqltxt= "INSERT INTO tblTransaction Values (null,'Check','','','" & lngDate & "'," _
&"'" & Main.strBankAccount & "','','0','0','0','','Check','0','','','0','0','')"
Main.SQL1.ExecNonQuery(sqltxt)
That stores 1379736978488 which is apparently a valid date.
then I have bunch of code that doesn't work....I need to print it on a check and display
the date in a register.
Sub dateStuff
'Dim TheDate As Long
'Dim strdate As String
DateTime.DateFormat = "yyyy-MM-dd"
lngDate= DateTime.DateParse(curMaster.GetString("Date")) <---the one I stored above
DateTime.DateFormat = "dd/MM/yyyy"
strdate = lngDate
edtDate.Text= DateTime.Date(strdate) ( or lngDate?? )
End Sub
Help, Mike - Lake Tahoe
how do I save a date and then get it back from SQL and display it.
I save it this way
lngDate = DateTime.Now
DateTime.DateFormat = "yyyy-MM-dd"
sqltxt= "INSERT INTO tblTransaction Values (null,'Check','','','" & lngDate & "'," _
&"'" & Main.strBankAccount & "','','0','0','0','','Check','0','','','0','0','')"
Main.SQL1.ExecNonQuery(sqltxt)
That stores 1379736978488 which is apparently a valid date.
then I have bunch of code that doesn't work....I need to print it on a check and display
the date in a register.
Sub dateStuff
'Dim TheDate As Long
'Dim strdate As String
DateTime.DateFormat = "yyyy-MM-dd"
lngDate= DateTime.DateParse(curMaster.GetString("Date")) <---the one I stored above
DateTime.DateFormat = "dd/MM/yyyy"
strdate = lngDate
edtDate.Text= DateTime.Date(strdate) ( or lngDate?? )
End Sub
Help, Mike - Lake Tahoe