M
mk62
I have a table of contacts that have dates in all different formats. Is there
a way to use the IsDate() function in a query to return only dates of a
certain type? Or can this function make all the dates the same format? I know
I can change the Data Type to Date/Time, but I want to leave it "text".
I was given the following example of IsDate() Function:
Sub CheckDate()
Dim strDate As String
strDate = InputBox("Enter string to display as a date.")
' Test variable.
If IsDate(strDate) Then
' If string is date, format and display in dialog.
MsgBox "The date is: " & Format(DateValue(strDate), "Long Date")
Else
MsgBox "The value you entered is not a date."
End If
End Sub
Can this be modified to get what I need? Please give detailed examples; I am
very new at this.
Also, I put the above Sub into a module, but didn't know how to run it. Does
it go into a module?
Thank You.
a way to use the IsDate() function in a query to return only dates of a
certain type? Or can this function make all the dates the same format? I know
I can change the Data Type to Date/Time, but I want to leave it "text".
I was given the following example of IsDate() Function:
Sub CheckDate()
Dim strDate As String
strDate = InputBox("Enter string to display as a date.")
' Test variable.
If IsDate(strDate) Then
' If string is date, format and display in dialog.
MsgBox "The date is: " & Format(DateValue(strDate), "Long Date")
Else
MsgBox "The value you entered is not a date."
End If
End Sub
Can this be modified to get what I need? Please give detailed examples; I am
very new at this.
Also, I put the above Sub into a module, but didn't know how to run it. Does
it go into a module?
Thank You.