Skip to main content

Date in the excel is in dd-MMM-yyyy format but the select query is giving the it in wrong format like 44803.

Hi @Vamshidhar.G2 ,

 

Check whether the Excel file is in use or not while the DB action is carrying out. If yes, please close it and try again. Else, you can assign the Date to a String and then to a Date variable. From there, convert the format to the desired one through Date to String action and finally put it in your Insert query.


Hi @Padmakumar , thanks for responding. I have found the solution. Issue happened as the excel file was opened while running the DB command. When I closed it and ran the query, the date value is coming in the correct format now.

 

 


Try formatting the date in excel using vb script or python in input excel and then fetch it using excel as a database. 

 


Date in the excel is in dd-MMM-yyyy format but the select query is giving the it in wrong format like 44803.

It’s easier change the Excel datatype column in the spreadsheet to Custom format.


Reply