vba_monkey
Board Regular
- Joined
- Dec 18, 2013
- Messages
- 112
Hello,
The following code will return the value 20173, can anyone tell how to get it to return the value 201703?
I don't mean to simply add the zero so if this code was run it should return the value 201710 not 2017010
Thanks
The following code will return the value 20173, can anyone tell how to get it to return the value 201703?
Code:
Format(DateAdd("m", -8, Date), "yyyy") & Format(DateAdd("m", -8, Date), "m")
I don't mean to simply add the zero so if this code was run it should return the value 201710 not 2017010
Code:
Format(DateAdd("m", -1, Date), "yyyy") & Format(DateAdd("m", -1, Date), "m")
Thanks
Last edited: