Shamsuddeen
Active Member
- Joined
- Feb 16, 2002
- Messages
- 292
Hi everybody,
I have the following UDF to convert the dates from text format (eg:- 22.02.2004) to Date format. (Text format dates are imported from other software to excel and there are more than 500 such dates)
Function MyDate(TextDate) As Date
MyDate = Left(TextDate, 2) & "-" & Mid(TextDate, 4, 2) & "-" & Right(TextDate, 4)
End Function
The above UDF works fine but it returns the date as a date serial number which again I have to format as dd-mmm-yyyy thru Format...Cells.....
Is it possible to display the date in dd-mmm-yyyy format thru the above UDF instead of showing it as a serial number?
Regards,
Shamsuddeen
I have the following UDF to convert the dates from text format (eg:- 22.02.2004) to Date format. (Text format dates are imported from other software to excel and there are more than 500 such dates)
Function MyDate(TextDate) As Date
MyDate = Left(TextDate, 2) & "-" & Mid(TextDate, 4, 2) & "-" & Right(TextDate, 4)
End Function
The above UDF works fine but it returns the date as a date serial number which again I have to format as dd-mmm-yyyy thru Format...Cells.....
Is it possible to display the date in dd-mmm-yyyy format thru the above UDF instead of showing it as a serial number?
Regards,
Shamsuddeen