I have a datetime variable now and the format is "MM/dd/yyyy HH:mm:ss”. How could I change the format to “MM/dd/yyyy” (essentially get rid of the hour, minute and seconds) and keep this variable as a datetime variable?
Thank you for your help.
Hi Buddy @ianhyj
use like this if variable is in_datetime_var
str_format = in_datetime_var.ToString(“MM/dd/yyyy”)
out_datetime_var = Datetime.Parseexact(str_format,“MM/dd/yyyy”,system.globalization.cultureinfo.invariantculture)
is that working buddy… @ianhyj
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.