E
ExcelMonkey
I am calculating dates in a loop and using the following date format:
DateFormat = "dd/mm/yyyy h:mm"
When I print to the Immediate Window, the first hour (hour ending 0) shows
up without the h:mm extension. I expected to see: 01/01/2005 00:00:00.
Why is this?
Thanks
CurrentDate = Format(DateSerial(CurrentYear, CurrentMonth, CurrentDay),
DateFormat)
Debug.Print CurrentDate
CurrentDate = Format(CurrentDate + 1 / 24, DateFormat)
Debug.Print CurrentDate
Immediate Window:
01/01/2005
01/01/2005 01:00:00
DateFormat = "dd/mm/yyyy h:mm"
When I print to the Immediate Window, the first hour (hour ending 0) shows
up without the h:mm extension. I expected to see: 01/01/2005 00:00:00.
Why is this?
Thanks
CurrentDate = Format(DateSerial(CurrentYear, CurrentMonth, CurrentDay),
DateFormat)
Debug.Print CurrentDate
CurrentDate = Format(CurrentDate + 1 / 24, DateFormat)
Debug.Print CurrentDate
Immediate Window:
01/01/2005
01/01/2005 01:00:00