02-28-2012, 07:38 AM
(This post was last modified: 02-28-2012, 07:39 AM by inborntester.)
Right function first argument should be string type.
Can you try like.
Don't use year as variable, its a keyword.
moreover you can try the simply way by using month,day,year functions.
Can you try like.
Code:
stryear = Right("02/27/2012", 4)
moreover you can try the simply way by using month,day,year functions.
Code:
DateRequested="02/27/2012"
DateRequested = month(DateRequested) & "-" & day(DateRequested) & "-" & year(DateRequested)
msgbox(DateRequested)