J
Jason
I have a short time field and I am trying to get the hour portion without the
minutes.
For 17:00 I would like to return 17 and for 07:00 return 07
I have tried the left function but that returns 7: for 7:00 (which makes
sense) but it also returns 5: for 17:00
Can anyone help me return the values before the semicolon. I would like to
end up with 07 and 17
Here is the SQL I have if it helps
SELECT Tbl_UnitHours.UHID, Tbl_UnitHours.ShiftAssignedTo,
Tbl_UnitHours.StartTime, Tbl_UnitHours.EndTime, "(" &
[Tbl_DayofWeek]![DayAbrv] & ")" & [Qry_Stations]![StationAbrv] & "(" &
[Qry_Units]![Unit Abrv] & ")" AS Shift, Left([Tbl_UnitHours]![StartTime],2)
AS Expr1
FROM ((Tbl_UnitHours INNER JOIN Tbl_DayofWeek ON Tbl_UnitHours.DayofWeek =
Tbl_DayofWeek.DayID) INNER JOIN Qry_Stations ON Tbl_UnitHours.Station =
Qry_Stations.StationID) INNER JOIN Qry_Units ON Tbl_UnitHours.Unit =
Qry_Units.UnitID;
minutes.
For 17:00 I would like to return 17 and for 07:00 return 07
I have tried the left function but that returns 7: for 7:00 (which makes
sense) but it also returns 5: for 17:00
Can anyone help me return the values before the semicolon. I would like to
end up with 07 and 17
Here is the SQL I have if it helps
SELECT Tbl_UnitHours.UHID, Tbl_UnitHours.ShiftAssignedTo,
Tbl_UnitHours.StartTime, Tbl_UnitHours.EndTime, "(" &
[Tbl_DayofWeek]![DayAbrv] & ")" & [Qry_Stations]![StationAbrv] & "(" &
[Qry_Units]![Unit Abrv] & ")" AS Shift, Left([Tbl_UnitHours]![StartTime],2)
AS Expr1
FROM ((Tbl_UnitHours INNER JOIN Tbl_DayofWeek ON Tbl_UnitHours.DayofWeek =
Tbl_DayofWeek.DayID) INNER JOIN Qry_Stations ON Tbl_UnitHours.Station =
Qry_Stations.StationID) INNER JOIN Qry_Units ON Tbl_UnitHours.Unit =
Qry_Units.UnitID;