SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic 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 ASP Free Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old October 7th, 2004, 01:31 PM
Kristin Kristin is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 56 Kristin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
check date status....

Does anyone know how to check for date status? I am trying to incorporate todays date in my if statement. I have a text box, txttoday, that retrieves todays date on my form activation. Can anyone see the error in my code in the first line?

If txtselection.Text = "Quarterly" And txttoday.Text <= "10/31/2004" Then
do something
Else
do something else
EndIf

Any ideas where I am going wrong?

thanks!
kristin

Reply With Quote
  #2  
Old October 7th, 2004, 02:06 PM
techyashish techyashish is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: California,UA
Posts: 42 techyashish User rank is Private First Class (20 - 50 Reputation Level)techyashish User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 3 h 43 m 21 sec
Reputation Power: 5
Send a message via MSN to techyashish Send a message via Yahoo to techyashish Send a message via Google Talk to techyashish
Thumbs up u can use date function

If txtselection.Text = "Quarterly" And txttoday.Text <= date(now)Then
do something
Else
do something else
EndIf


or

If txtselection.Text = "Quarterly" And txttoday.Text <= date() Then
do something
Else
do something else
EndIf



regards

ashish
mct,mcse,mcsd,mcdba

Reply With Quote
  #3  
Old October 7th, 2004, 05:02 PM
Kristin Kristin is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 56 Kristin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Actually, I need to check the value of "today" against 4 dates....that is - quarterly.

If txtselection.Text = "Quarterly" And txttoday < "01/01/2004" Then

just can't get the format right.....

Reply With Quote
  #4  
Old October 7th, 2004, 05:37 PM
Kristin Kristin is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 56 Kristin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
found my solution in my book, in case anyone was wondering....


If txtselection.Text = "Quarterly" And txttoday.Text <= #10/31/2004# Then
do something
Else
do something else
EndIf

the # is the key

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > check date status....


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 4 hosted by Hostway