I am trying to make a "Billing" system and I have found code that will take how many days different a date is like this:
Dim dtNow, dtY2K
dtNow = Date()
dtY2K = DateSerial(2005, 1, 2)
dtY3K = DateSerial(2005, 1, 1)
Dim iDaysDifference
iDaysDifference = DateDiff("d", dtY2K, dtNow)
Response.Write(iDaysDifference)
Response.Write(dtY3K)
If IDaysDifference > 30 then
Response.Write("BILL!")
else
Response.Write("BILLED!")
end if
How do I submit a date to my Access Database in the Form of year, month, day?
Then from there I would do:
strsql = "SELECT * FROM BILLING WHERE M_ID = '" & MemberID & "'"
set rsC = Server.CreateObject("ADODB.RECORDSET")
rsC.open strsql, my_conn
'MY ORDER BY STUFF HERE
'MY LAST RECORD (most up to date)
strUserPaymentDate = rsC("PAYMENT_DATE")
set rsC = nothing
Dim dtNow, dtY2K
dtNow = Date()
dtY2K = DateSerial(strUserPaymentDate)
dtY3K = DateSerial(2005, 1, 1)
Dim iDaysDifference
iDaysDifference = DateDiff("d", dtY2K, dtNow)
Response.Write(iDaysDifference)
Response.Write(dtY3K)
If IDaysDifference > 30 then
Response.Write("BILL!")
else
Response.Write("BILLED!")
end if
Now how to just get that date into the DB. Should I use like a replace function for the / to replace it with , ?
If so How?
Thanks for all help that can be Given