Datetime format return "1" instead of "01"

hey guys, so as you know date time like 01-01-2019 and 26-01-2019 is in the format of “dd-MM-yyyy” so when i used .tostring(“dd”) my solution will return me “01” and “26”. is there a format that can return me “1” instead of “01” and “26” returns “26” for example? or do i have to convert to integer then convert back to string?

thanks in advance

1 Like


hey man, thanks for replying

i’ve tried “d” before, it returns me in the format of “dd-mm-yyyy”.

nevermind i found out i could just use .Day to return 1 instead of 01.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.