Change Date Format to dd-MMM-yy

Hi there

I am trying to change datetime format from initial one to dd-MMM-yy
It suppose to work when I try to assign

Variable string = DateVariable.tostring(“dd-MMM-yyyy”)
But somehow it just return as dd-MMM-yyyy instead of 03-Mar-2018

Can someone help me with this?

,Main.xaml (5.3 KB)

@minye904 check attached file

Main (5).xaml (4.9 KB)

Looks like its happening since your variable is of type GenericValue. Try changing it to DateTime.

Thanks,
Rammohan B.