|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
asp date compare
set conn=server.CreateObject("ADODB.Connection")
conn.open "DBQ="& Server.MapPath("wb.mdb")& ";Driver={Microsoft Access Driver (*.mdb)};" dim Rec,SQL dim q,d,f,c,k,TransDate1,TransDate2,Fdate1,Fdate2 Set Rec=server.CreateObject("ADODB.Recordset") SQL= "select * from tbl_PayTx" Rec.open SQL,conn,3,3 Rec.MoveFirst while not Rec.EOF 'TransDate1=Rec("DTm") 'TransDate1=Format(Rec("DTm"), "dd/mm/yyyy") Fdate1=mid(Rec("DTm"),1,12) Fdate2 = InStr(1, Fdate1, " ", vbTextCompare) TransDate1=mid(Rec("DTm"),1,Fdate2) TransDate2 = ""& request("Tdate")&"" if trim(TransDate1)=trim(TransDate2) then using this i try to compare date in the ms acess DTm field and Tdate textbox date but when i type the same date in the text box as in the database in the DTm field i don't get any output of the matched dates details Please help in forward thanks for help Last edited by aynka2000 : August 28th, 2003 at 09:57 PM. |
|
#2
|
||||
|
||||
|
Read the sticky of "How to post a question". You'll note that one of the points in that post is that only you know what "doesn't work" means. Do you get an error? What error? Or is the result just different than you expected?
We're gurus, not psychics ![]() |
|
#3
|
|||
|
|||
|
I am taking a psychic guess here
![]() There is no format() function in VBS, or if there is it's undocumented. That could be causing an error. You could use the datediff function to compare the dates, it may be easier than parsing out the string. You can find the vbscript function reference here http://msdn.microsoft.com/library/e...riFunctions.asp |
|
#4
|
|||
|
|||
|
Yes...and after reading what karsh44 told you, look a the attached file I sent you!
Vlince |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > asp date compare |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|