|
-
Dec 2nd, 2008, 09:56 AM
#1
Thread Starter
Fanatic Member
VB.Net Date.MinValue
In a Database Aplication I need to check if Periodes overlap but I need to diffrentiate between startdates that aren't filled and startdates In an infinate Past
So how do I workaround this problem...
using a nullable(of Date) gives hell as well because a date can contain nothing as well as a minvalue and in some cases it will give a
.hasvalue = False
but in other situtions a .hasvalue = True with a date of Date.Minvalue!
'Just a startdate
Dim StartDate as Date
' code somewhere in the user interface to indicate an infinate startdate
StartDate = Date.Minvalue
' Somewhere in validation of Data before storing in the database
If StratDate is nothing then
'This mesage will appear!!!!!!!
Msgbox("You need to enter a startdate")
end if
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
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
|