Skip to main content

Posts

Showing posts with the label DateTime

Custom Date and Time Format Strings Used in UiPath

A custom format string consists of one or more custom date and time format specifiers. Any string that is not a standard date and time format string is interpreted as a custom date and time format string. In this, we will cover some formats to COnvert the Date and Time from Different Formats to our format. This is a variable, I am using "vDatVariable= Generic". Convert.ToDateTime(vDatVariable.toString).toString("dd MMM yyyy") Now.toString("dd MM yyyy") First Format: The Date you are fetching, coming in this format Second Format: The format you want. DateTime.ParseExact(vDatVariable.ToString,"dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy") DateTime.ParseExact(vDatVariable.ToString,"dd-MMM-yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo,Globalization.DateTimeStyles.None).ToString("MM/dd/yyyy") For More Info Refer this Link: Click here...