Skip to main content

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

Comments

  1. Thanks, this is generally helpful.
    Still, I followed step-by-step your method in this
    ui path training
    ui path online training
    ui path course
    rpa online training

    ReplyDelete
  2. Please continue this great work and I look forward to more of your awesome blog posts. view

    ReplyDelete
  3. Thanks, this is generally helpful.Very Useful Information .
    Visit us: java course
    Visit us: Java Online Training Hyderabad
    Visit us: Core Java Online Course

    ReplyDelete

Post a Comment