• Michael makes a great point!

    You can use the REPLICATE function to accomplish this much more simply, and

    if needed you could use the DATELENGTH() string function to set the length