I have a date stored in a variable: invDate (mm/dd/yyyy). As part of my sub I need to convert it to text in the format "yyyy-mm-dd". I've seen several solutions on this board, but for some reason they aren't working for me:
expItemDate = VBA.Format(CStr(invDate), "yyyy-mm-dd") - doesn't work, it returns a date in the original mm/dd/yyyy formatexpItemDate = VBA.Format(invDate, "yyyy-mm-dd") - doesn't work either, same thing it returns mm/dd/yyyy format
expItemDate = VBA.Format(CStr(invDate), "yyyy-mm-dd") - doesn't work, it returns a date in the original mm/dd/yyyy formatexpItemDate = VBA.Format(invDate, "yyyy-mm-dd") - doesn't work either, same thing it returns mm/dd/yyyy format