You are reading a single comment by @chez_jay and its replies. Click here to read the full conversation.
  • Anyway, back to shit Excel questions.

    Anyone any idea why, if I save a file as a csv using a macro it saves with American format dates? If I save the exact same file manually as a csv it comes out with UK date format.

    I'm assuming there is a locale setting I've missed somewhere but I'm fucked if I know where.

    Code to save is

     ActiveWorkbook.SaveAs Filename:= _
            RootFolder & Chr(j) & h & ".csv", FileFormat _
            :=xlCSVUTF8, CreateBackup:=False
    
  • I have to say exporting date values in your computer's locale format gives me a sense of unease.

    Maybe I have worked with too many Americans or databases, but I would prefer YYYY-MM-DD, which is ISO 8601 compliant.

About

Avatar for chez_jay @chez_jay started