473,411 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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
2 1196
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: Odd-R. | last post by:
I have to lists, A and B, that may, or may not be equal. If they are not identical, I want the output to be three new lists, X,Y and Z where X has all the elements that are in A, but not in B, and...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
7
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem...
2
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.