Could someone help me work out out a way to either convert a smalldatetime
value from my database(access) to a normal date with out the trailing time.

Is it simple matter of using FormatDate or does one need to do string
maniupulation?

Current
9/13/2003 11:36:00 AM

What I want:
9/13/2003

Thanks
Jason

Re: Strip time from date? by Tom

Tom
Sat Sep 13 12:45:24 CDT 2003

If it's just for display then use FormatDateTime

"jason" <jason@catamaranco.com> wrote in message
news:%23RJkIzheDHA.4024@TK2MSFTNGP11.phx.gbl...
> Could someone help me work out out a way to either convert a smalldatetime
> value from my database(access) to a normal date with out the trailing
time.
>
> Is it simple matter of using FormatDate or does one need to do string
> maniupulation?
>
> Current
> 9/13/2003 11:36:00 AM
>
> What I want:
> 9/13/2003
>
> Thanks
> Jason
>
>
>
>



Re: Strip time from date? by dlbjr

dlbjr
Sat Sep 13 13:14:37 CDT 2003

If all you want to store in the database is the date then set this in the
field properties in access

For presentation purposes use

dtmDate = "9/13/2003 11:36:00 AM" ' rs("date_field")
dtmDate = ConvertDate(dtmDate)

Function ConvertDate(str1)
ConvertDate = "NAD"
If IsDate(str1) Then
ConvertDate= FormatDateTime(str1,2)
End If
End Function


-dlbjr

invariable unerring alien