View Single Post
Old 07-07-2007, 01:27 PM   #11 (permalink)
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
There are many ways to do it, but I like this way, as you now have the date broke down into months, day and year. You can then load it into a date var and then use date functions on it.

I have DD, MM and YY set up as strings, which is fine, since they contain leading zeros in them. You can use the val(MM) to turn them into integers. Caution when using VAL:

If will ignore spaces, so if you have 10 05 the val will be 1005 instead of the expected 10. This is by VB design, it only messed me up once when some whacko was naming his team with numbers. I use the - to separate the two, as 10-05, as a val of that would be 10. Then I can always search the string for the - to find the 05 value.

Hope this helps
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote