I need to separate a datetime field and just show date. I've seen the posts
regarding TimeValue but I'm not having any luck with this.
The field is set up as a text field and the data looks like this :
11/30/1999 2:17:52 PM
I've used this in my query :
Mod Action Time : TimeValue(Mid([ACTIONTIME],9,2) & ":" &
Mid([ACTIONTIME],11,2))
where mod action time is a new blank field and ACTIONTIME is the existing
text field described above. Please help.
Thank you,
Welthey
Tom van Stiphout - 23 Jan 2008 04:38 GMT
Use the Format function:
format(#11/30/1999 2:17:52 PM#,"mm/dd/yyyy")
=> 11/30/1999
-Tom.
>I need to separate a datetime field and just show date. I've seen the posts
>regarding TimeValue but I'm not having any luck with this.
[quoted text clipped - 13 lines]
>
>Welthey
John W. Vinson - 23 Jan 2008 05:46 GMT
>I need to separate a datetime field and just show date. I've seen the posts
>regarding TimeValue but I'm not having any luck with this.
[quoted text clipped - 13 lines]
>
>Welthey
You're making it too hard. From the Immediate window:
?datevalue("11/30/1999 2:17:52 PM")
11/30/1999
?timevalue("11/30/1999 2:17:52 PM")
2:17:52 PM
Just use TimeValue([ACTIONTIME]) or DateValue([ACTIONTIME]) as needed.
John W. Vinson [MVP]