Building off this, you can use left, right, and count together to get the various date parts out regardless of whether the leading zero is present or not.
By returning a true Date object, you can then modify that to output to any format you like, so if you prefer the long date style of "July" instead of "7", you can do that.
var dateNum = Text(7012021)
var y = right(dateNum, 4)
var d = left(right(dateNum, 6), 2)
var m = left(dateNum, 8 - count(dateNum)) - 1
// month is returned as the number - 1, as Date function takes month as a 0-indexed value, i.e., January = 0
var dt = Date(y, m, d)
return Text(dt, 'MMMM DD Y')
- Josh Carlson
Kendall County GIS