Hello, I am completely green when it comes to making my own functions. Could someone tell me what I'm doing wrong here? I am sorry I was not able to find a relevant previous post.
--------------------------------------------------------------------------------------------------------------------------------
Function mDate(yyyymmdd1 As String)
'Converts date strings from "yyyymmdd" format to "mm/dd/yyyy" format
'Function will only work on strings with a length of 8 characters
mDate = Format(DATE(LEFT(yyyymmdd1,4),RIGHT(LEFT(yyyymmdd1,6),2),RIGHT(yyyymmdd1,2)), "Short Date")
End Function
--------------------------------------------------------------------------------------------------------------------------------
Thanks,
Max
--------------------------------------------------------------------------------------------------------------------------------
Function mDate(yyyymmdd1 As String)
'Converts date strings from "yyyymmdd" format to "mm/dd/yyyy" format
'Function will only work on strings with a length of 8 characters
mDate = Format(DATE(LEFT(yyyymmdd1,4),RIGHT(LEFT(yyyymmdd1,6),2),RIGHT(yyyymmdd1,2)), "Short Date")
End Function
--------------------------------------------------------------------------------------------------------------------------------
Thanks,
Max