By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,022 Members | 856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,022 IT Pros & Developers. It's quick & easy.

Comparing Data/Time field with Integer field (both storing time information)?

P: n/a
Hi,

I am writing an SQL query in which I need to compare two fields which
are both storing time information. The datatype of the first field is
Date/Time and the format is HH:MM. The second field is stored as an
integer formated as HHMMSS. I'm kind of lost here. Any help you could
give me would be greatly appreciated.

Oct 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You could convert that integer to a time value like this:
CDate(Format([MyInteger], "00\:00\:00"))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Mo*********@gmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
Hi,

I am writing an SQL query in which I need to compare two fields which
are both storing time information. The datatype of the first field is
Date/Time and the format is HH:MM. The second field is stored as an
integer formated as HHMMSS. I'm kind of lost here. Any help you could
give me would be greatly appreciated.

Oct 24 '06 #2

P: n/a
Thanks a bunch! I will try it first thing tomorrow.

Allen Browne skrev:
You could convert that integer to a time value like this:
CDate(Format([MyInteger], "00\:00\:00"))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Mo*********@gmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
Hi,

I am writing an SQL query in which I need to compare two fields which
are both storing time information. The datatype of the first field is
Date/Time and the format is HH:MM. The second field is stored as an
integer formated as HHMMSS. I'm kind of lost here. Any help you could
give me would be greatly appreciated.
Oct 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.