convert dates to numeric values

J

jnew

Greetings,

How can I display dates as numeric values in query results?

I need to UNION two tables. Each has an ID field (primary
key--auto number) and a date field. Here is my problem:
Due to a lack of foresight, each table may end up with
duplicated IDs. To uniquely identify a row in the UNION
query, I'd like to add the ID and date, but the result
appears as a date. I would like it to appear as the serial
number.

Any help will be greatly appreciated.

jn
 
J

John Spencer (MVP)

To force a date to a number you can use one of the conversion functions.

ID + CDbl(DateField)

Depending on your data you could end up with duplicates. Why not just use both
fields in the select statement?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top