excel vba date to string conversion

The solution for “excel vba date to string conversion” can be found here. The following code will assist you in solving the problem.

Excel formula to turn a date/time into text:

=TEXT(A1,”DD/MM/YYYY hh:mm:ss AM/PM”)

‘ https://support.office.com/en-us/article/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c


‘VBA function to do the same thing:
Function DateToText$(dbl#)
DateToText = Format(dbl, “DD/MM/YYYY hh:mm:ss AM/PM”)
End Function

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts