467,879 Members | 1,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

Comparing of dates

Dear sir,

1. Is there any function used to compare dates in the same way as strings are compared ?
As in : Date 1= 11/22/2006
Date 2= 11/23/2006
Nov 22 '06 #1
  • viewed: 1897
Share:
2 Replies
100+
Dear sir,

1. Is there any function used to compare dates in the same way as strings are compared ?
As in : Date 1= 11/22/2006
Date 2= 11/23/2006
hi

if (string) "Date 1" (rather no space in variables) is "11/22/2006"
you can use this directly
Nov 22 '06 #2
100+
hi

if (string) "Date 1" (rather no space in variables) is "11/22/2006"
you can use this directly
hi

2ndly you can use DateDiff

date0 = "12/03/2006"
date1 = Format(Date, "dd/mm/yyyy")
diff = DateDiff("d", date0, date1)
Nov 22 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Mike N. | last post: by
2 posts views Thread by Duppypog | last post: by
2 posts views Thread by Philip Townsend | last post: by
2 posts views Thread by Manny Chohan | last post: by
2 posts views Thread by ameshkin | last post: by
12 posts views Thread by colincolehour | last post: by
4 posts views Thread by cheryl | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.