View VMD_TimeToHour

Card of view VMD_TimeToHour

Name

VMD_TimeToHour

Comment

Like VMD_Time (view) and MD_Time (table/dimension), but contains only rows where MD_Time_Minute and MD_Time_Second = 0.

Dimensional Type

Dimension


SQL query of the view VMD_TimeToHour

select
MD_Time_TimeInteger,
MD_Time_HourOfDay24,
MD_Time_HourOfDay12,
MD_Time_AMPM
from
MD_Time
where
MD_Time_Minute = 0
AND MD_Time_Second = 0


List of incoming view references of the view VMD_TimeToHour

Name

Child Table/View

ViewReference_183

VMF_ReadingByHourAccumulating

ViewReference_195

VMF_ReadingByHourSnapshot

ViewReference_210

VMF_ReadingByHourNoAggregations

ViewReference_234

VMF_KeyedComputerInUse

ViewReference_241

VMF_KeyedComputerInUseWithRoomUtilization


List of shortcuts of the view VMD_TimeToHour

Name

Code

Type

Target Package

VMD_TimeToHour

VMD_TIMETOHOUR

View

ViewsEnergy


List of diagrams containing the view VMD_TimeToHour

Name

ViewsEnergyDiagram


List of permissions of the view VMD_TimeToHour

Grant

User

SELECT,VIEW DEFINITION

EnergyReader


List of view columns of the view VMD_TimeToHour

Name

Data Type

Comment

Length

MD_Time_TimeInteger

int

Integer representing the time of day in the format HHMMSS (e.g., 23:01:01 at one minute one second after eleven o'clock in the evening). Not typically used for reporting.

Unlike MD_Date_Dateinteger (in MD_Date), this integer is not really human-readable, because it's not set up for base-10. Rather, it's calculated using the formula: (hour << 16) Or (min << 8) Or (sec), where the Or's are logical, and the << operator is a binary left shift. In T-SQL, this is (hour * POWER(2, 16)) + (minute * POWER(2, 8)) + second.

 

MD_Time_HourOfDay24

int

Hour of day, 0-23.

 

MD_Time_HourOfDay12

int

Hour of day, by twelve-hour clock (0-11).

 

MD_Time_ampm

char(2)

Value will be "am" or "pm" depending on whether the time in question occurs before or after 12:00 noon.

2