Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:40 AM
joeandtel
Guest
 
Posts: n/a
Default minus one date from another

Is there a way if someone enters a date, like 02/02/04, and have that date subtract from 02/04/04; so the number 2 is returned, and if you wanted to see if 02/05/04 is greater than 02/04/04 returns true?
  #2  
Old July 19th, 2005, 11:40 AM
Curt_C [MVP]
Guest
 
Posts: n/a
Default Re: minus one date from another

DateDiff()

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"joeandtel" <joeandtelus@yahoo.com> wrote in message
news:7E291B66-DE98-4247-A54C-F715516DC347@microsoft.com...[color=blue]
> Is there a way if someone enters a date, like 02/02/04, and have that date[/color]
subtract from 02/04/04; so the number 2 is returned, and if you wanted to
see if 02/05/04 is greater than 02/04/04 returns true?


  #3  
Old July 19th, 2005, 11:40 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: minus one date from another

> Is there a way if someone enters a date, like 02/02/04

First of all, how are you or your software going to determine if that is Feb
2 / 2004 or Feb 4 / 2002?
[color=blue]
> subtract from 02/04/04[/color]

Next, how are you or your software going to determine if that is Feb 4 /
2004 or Apr 2 / 2004 or Apr 4 / 2002?

Don't allow free text date entry! You are guaranteed to have confused
people and incorrect results.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles