public static string[] HoursInDay(DateTime dateTime)
{
DateTime tmp = dateTime.AddHours(-dateTime.Hour);
return new[]
{
string.Format("{0:yyyyMMddHH}", tmp),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(1)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(2)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(3)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(4)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(5)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(6)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(7)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(8)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(9)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(10)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(11)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(12)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(13)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(14)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(15)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(16)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(17)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(18)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(19)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(20)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(21)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(22)),
string.Format("{0:yyyyMMddHH}", tmp.AddHours(23))
};
}