O
onliner
I have downloaded data which contains a column of review dates. The dates
are formatted as mm/dd/yyyy.
I have code that expects the date to always be 8 digits (and apparently
text) in the form of, "05152004".
The current code treats the month segment as
=If(Left(A1,2)="05", Then do something...
which currently fails for months 1 thru 9.
I know I could do; =If(Month(A1)=5, etc. but this would involve finding and
replacing every instance of date-handling code. I was hoping that I could
perform a one-time vba procedure on the date column such that the stored
month segment was two digits.
I've tried various date format changes attempting to get month numbers less
than 10 to be treated as 2-digits by the code, but I've had no luck.
Is there a way to "force" the leading zero for the month - not just what is
displayed on screen but what is actually stored in the cell?
Thanks,
Bud
are formatted as mm/dd/yyyy.
I have code that expects the date to always be 8 digits (and apparently
text) in the form of, "05152004".
The current code treats the month segment as
=If(Left(A1,2)="05", Then do something...
which currently fails for months 1 thru 9.
I know I could do; =If(Month(A1)=5, etc. but this would involve finding and
replacing every instance of date-handling code. I was hoping that I could
perform a one-time vba procedure on the date column such that the stored
month segment was two digits.
I've tried various date format changes attempting to get month numbers less
than 10 to be treated as 2-digits by the code, but I've had no luck.
Is there a way to "force" the leading zero for the month - not just what is
displayed on screen but what is actually stored in the cell?
Thanks,
Bud