I am trying to convert the date from 06-10-2009 00:00:00 to yyyy-MM-dd. I need this for automated data import through Salesforce Apex Data Loader through command line. Thus opening Excel manually and formatting the columns is out of question.
I have tried my hands on with following VBScript - but it didn't help.
Option Explicit
Dim objExcel1, objWB, strPathExcel1, objSheet1
Set objExcel1 = CreateObject("Excel.Application")
strPathExcel1 = "C:\Path\To\File\Details.csv"
Set objWB = objExcel1.Workbooks.Open(strPathExcel1)
Set objSheet1 = objWB.Worksheets(1)
objExcel1.Visible = True
objSheet1.Columns("E:E").NumberFormat = "yyyy-MM-dd"
objWB.Save
objWB.Close
objExcel1.Quit
I do not know any of VB Scripting at all. All I need to do is convert the date format of a CSV column into yyyy-MM-dd. Also I need to invoke the script from Windows Batch file. I would appreciate if someone briefly adds on how to invoke a VBScript from a Batch file.