473,503 Members | 10,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 19 '05 #1
2 1515
DateDiff()

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"joeandtel" <jo*********@yahoo.com> wrote in message
news:7E**********************************@microsof t.com...
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?
Jul 19 '05 #2
> 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?
subtract from 02/04/04


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/
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13826
by: Newbie | last post by:
Hi, Could someone please tell how MINUS operator works for comparing and giving non-matching records in Table1? Does MINUS operator compares all records of Table1 with all records of Table2 to...
6
8752
by: RobG | last post by:
I am writing a script to move an absolutely positioned element on a page by a factor using style.top & style.left. The amount to move by is always some fraction, so I was tossing up between...
2
3656
by: Asha | last post by:
hello... can someone tell me how to minus a date value? e.g. 17/01/2005 - 1 would be 18/01/2005 can someone show me how this is done?
1
2857
by: Arjen | last post by:
Hi, How can I calculate the date 2 years ago? I get a problem with datetime minus int (year). Can someone help? Thanks!
5
2239
by: Jumbo | last post by:
I need a script for my site that shows my servertime minus 7 hours. Anyone who can help?
6
26293
by: vijayk | last post by:
Hi all, I have a field which has data as YYYYMMDD, and I have to find the age of the person by substracting it from current date. can you please please advice... thanks
13
5068
by: Marc | last post by:
Hi, I've been lurking on clc for a few months now, and want to start by thanking the regulars here for opening my eyes to a whole new dimension of "knowing c". Considering I had never even...
4
11534
by: tamnguyet | last post by:
I have n days and a date, I want a date plus(or minus) to n days.How can I do that in javascript
7
1701
Dököll
by: Dököll | last post by:
Greetings and salutations! Ran a quick search here a found this: http://www.thescripts.com/forum/thread700194-Minus+date.html Though it is very helpful when dealing with dates alone, I cannot...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.