Different time formats in the same column

Shannon3778

Registered User.
Local time
Yesterday, 17:07
Joined
Dec 13, 2012
Messages
29
I have a query that is drawing info from a union query. There is a time column that is bringing over time in long form (ex 10/17/2013 4:00:00 pm) and just the time (4:00:00 pm). This actually works for me b/c it lets me see which table each piece of data came from but I need a helper column w/ a formula in it to identify it for me. Basically, I need a calculated column that will bring back the word "scheduled" and if it's in short form "actual". Is this even possible??
 
Last edited:
You can add calculated fields into UNION queries, you just have to make sure it's in the same place/same order in both halves.

What determines if it is scheduled or actual, the presence of the date part? Posting your UNION query will probably help.
 
You can add calculated fields into UNION queries, you just have to make sure it's in the same place/same order in both halves.

What determines if it is scheduled or actual, the presence of the date part? Posting your UNION query will probably help.


I have 2 tables. One is the scheduled time for our associates to take breaks and one is the actual time they took breaks. I have to find a way to compare the 2 tables to find out who tooks unscheduled breaks. Because the raw data comes from 2 different places and systems and are completely different in column names, data included, and even what they name the breaks (one names them brk1, 2, 3, etc and the other just break) it's impossible for me just to do a comparison or duplicates query. So, i created 2 queries... one for scheduled and one for actual and joined them in a union query. So now I have both sets of data in one query but the only way I can tell them apart is by the time formats. The scheduled time format has date and time and the actual one is just a short time... so I'm attempting to create a calculated column that will show scheduled if the time column shows a long date/time and shows actual if the time column is a short time. If I can do this then I can have a report that clearly shows if a break was scheduled or not....
 
Oh, if they're coming from different tables it should be even easier.
Add a calculated field "Scheduled" As BreakType in the half from the scheduled table, and vice versa from the other. Then your results should show clearly which is what.
 

Users who are viewing this thread

Back
Top Bottom