Hello,
I am trying to figure out a way to build a table of each hour of every day from 1/1/2003 through 12/31/2010. The table needs only a single datetime column. It will be used to develop a shared datetime dimension in analysis services that other tables with "real" datetimes will be joined.
The format of this datetime should be something like
2003/01/01 01:00:00
2003/01/01 02:00:00
2003/01/01 03:00:00
:
:
2010/12/31 21:00:00
2010/12/31 22:00:00
2010/12/31 23:00:00
I haven't a clue how to seed an initial value and then just keep adding an hour until the max date is reached.
Any help is appreciated.
Thanks,
Frank B.
I am trying to figure out a way to build a table of each hour of every day from 1/1/2003 through 12/31/2010. The table needs only a single datetime column. It will be used to develop a shared datetime dimension in analysis services that other tables with "real" datetimes will be joined.
The format of this datetime should be something like
2003/01/01 01:00:00
2003/01/01 02:00:00
2003/01/01 03:00:00
:
:
2010/12/31 21:00:00
2010/12/31 22:00:00
2010/12/31 23:00:00
I haven't a clue how to seed an initial value and then just keep adding an hour until the max date is reached.
Any help is appreciated.
Thanks,
Frank B.