When I tried the below code, I am getting the date in mm-dd-yyyy format.
But I require dd-mm-yyyy format.
Can anyone suggest how to do that.
Func TodaysDate()
return StringReplace(_DateTimeFormat(_NowCalc(), 2), "/", "-")
EndFunc
Earlier I tried dd-mmm-yyyy format and it is working with below code.
Func TodaysDate()
$NewDate = _DateTimeFormat(_NowCalcDate(),1)
$Array = StringSplit( $NewDate , ',' )
_ArrayDelete($Array, 0)
_ArrayDelete($Array, 0)
$Array1 = StringSplit($Array[0],' ')
RemoveEmptyArrayLines($Array1)
$Date = StringStripWS($Array1[2]&"-"&StringLeft($Array1[1], 3)&"-"&$Array[1], $STR_STRIPALL)
return $Date
EndFunc
Which is unnecessarily complicated I feel., the approach
Now I need format of dd-mm-yyyy.
Can anyone suggest how to do this.