I solved my problem with the issue of Julian date, but i have another small issue..
I have to use dates in calculation ... like a client types a appointment datat in textbox and in another textbox it shows that the date has to be between two days.
(appointment written in text box has to be 90 days after today but less than 100 days and also appointment cannot be not less than 80 of today)
I am really stuck here...I think I have to addDays of 90...but it will not let me use < less than or > greater than signs for dates..Do I have to format it first...not sure of it.
Here is part of my code that I've been working on
Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click Dim dteToday As Date = Today Dim aptDate As Date ' error if there is nothing typed in textbox ' puts focus back in txtApt textbox If txtApt.Text = "" Then lblOut.Text = "Must enter a date" txtApt.Focus() Exit Sub End If 'Error checking for date format and if date is today 'or date passed already/sets focus back in txtApt textbox If IsDate(txtApt.Text) Then aptDate = CDate(txtApt.Text) If aptDate = dteToday Then lblOut.Text = "date entered is today" ElseIf aptDate < dteToday Then lblOut.Text = "date entered has passed" End If Else lblOut.Text = "not a valid date" txtApt.Focus() txtApt.SelectAll() Exit Sub End If 'stuck here in calculation... 'appointment is 90 days after today but less than 100 days but not less than 80 'labels that print out i need to use in an if statement to calculate dates 'lblOut.Text = "confirmed" & aptDate.ToShortTimeString & "days until appointment" 'lblOut.Text = "appointment must be between" & aptDate.ToShortDateString & " and " & aptDate.ToShortDateString End Sub
Thank you :icon_confused:
Edited 5 Years Ago by msqueen082: n/a