Link to home
Start Free TrialLog in
Avatar of Mehram
MehramFlag for Pakistan

asked on

MS VS-2005 Function Null value return ''

I have the following function to convert "1/1/1900" date into " " which is working
However if the value is null then this function is not working.

  Protected Function PARSEDATE(ByVal ARG) As String

        If ARG.ToString().StartsWith("1/1/1900") Then
            Return " "
        Else
            Return ARG
        End If

    End Function

Could you please help how to fix that
Avatar of jimstar
jimstar

Check if ARG is null:

If IsNull(ARG) Then
Return " "
Else
' do your stuff here
End If
Avatar of Mehram

ASKER

isnull is not working
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial