Convert string variable to date
问题 I need to convert a string variable to a date variable in a VBA macro, to process the date to get the mMonth and year in order to name the worksheet Call GetMonthandYear(MonthYear, FileDate) ActiveSheet.Name = MonthYear I looking to create a method called GetMonthandYear. FileDate is a String in a date format, dd.MM.yyyy HH-mm-ss . If I can change the variable to a date, I can change the format to MMMM/yyyy and then use ToString , I think, and assign it to MonthYear . Is there a way to change