|
-
Oct 1st, 1999, 04:33 PM
#1
Thread Starter
Addicted Member
I am fairly new to VB and am accessing an Access database which contains dates. Does anyone have a recommended format for a date field (without time). I just need a pointer as to how to define it in Access and then how to validate it in VB6. Is there a standard or best way to do this? Thanks for all your help.
-
Oct 2nd, 1999, 09:28 AM
#2
Frenzied Member
Define the date field in whatever format you desire, in Access. It's going to keep the internal representation (a float) no matter what you choose. The Decimal portion of the number (should you decide to test the date value by converting it to a long) represents the number of days since 12/30/1899. The statement Cint(Date), currently, should give a number > 36400.
VB6 has a new function "IsDate" that returns a boolean value. You can use this and some combination of the DateAdd function to test a dates validity.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|