Excel Vba Convert Text Yyyymmdd To Date

[Solved] Excel Vba Convert Text Yyyymmdd To Date | Vb - Code Explorer | yomemimo.com
Question : excel vba convert text YYYYMMDD to date

Answered by : daniel-ferry

'In Excel we sometimes need to work with imported dates that
'are of the form: YYYYMMDD, for example: 20200325.
'Excel needs numbers (not text) for plotting charts and calculations.
'VBA function to convert text in YYYYMMDD format to real Excel dates:
Function Text2ExcelDate(t$) Text2ExcelDate = DateSerial(Mid(t, 1, 4), Mid(t, 5, 2), Mid(t, 7, 2))
End Function

Source : | Last Update : Thu, 02 Apr 20

Answers related to excel vba convert text yyyymmdd to date

Code Explorer Popular Question For Vb