So below i have an if else statement, and the dishchargeDateTime and Admit are being pulled from one database but i am also pulling a history number from another database not shown below. My question is that. If i am pulling and supposedly matching the history number with both of the Dish and admit dates below, would my not equal to <> and "" bring back a true value. In other words an example below, the first IF, if iam right it should only bring true the "AdmitDateTime").ToString <> "" right? and null will be in the ("DischargeDateTime").ToString = ""
Also is there a way i can only bring a result like in this case a date. If i only want to result a date from may 5, 2009?
IF i am wrong please let me know
thanks
CODE
If dr2.Item("DischargeDateTime").ToString = "" And dr2.Item("AdmitDateTime").ToString <> "" Then
'Do nothing! patient is active in EPR'
ElseIf dr2.Item("DischargeDateTime").ToString = "" Or dr2.Item("AdmitDateTime").ToString <> "" Then
'Send an A11 to discharge patient to cancel out of EPR since they have no admitdate or dishchargedate'
sMessage = ""
oWrite = File.AppendText(sPath)
oWrite.WriteLine(sMessage)
oWrite.Flush()
oWrite.Close()
End If
ElseIf dr2.Item("DischargeDateTime").ToString = "" And dr2.Item("AdmitDateTime").ToString <> "" Then
'Send an A03 message to