ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old August 28th, 2003, 01:27 PM
aynka2000 aynka2000 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 aynka2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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
Attached Files
File Type: asp disptrans.asp (4.6 KB, 249 views)

Last edited by aynka2000 : August 28th, 2003 at 09:57 PM.

Reply With Quote
  #2  
Old August 28th, 2003, 02:19 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
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

Reply With Quote
  #3  
Old August 28th, 2003, 02:37 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,711 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 21 m 59 sec
Reputation Power: 688
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

Reply With Quote
  #4  
Old August 28th, 2003, 02:42 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yes...and after reading what karsh44 told you, look a the attached file I sent you!

Vlince
Attached Files
File Type: asp disptrans.asp (5.0 KB, 424 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > asp date compare


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway