Date and time related

If an Example looks like this how to differentiate between date and time.

  1. What needs to t be done if I need only date
  2. what needs to be done if I need only time. any suggestions…?

Example: Mon, 12 Jul 2021 12:29:55 -0500

1 Like

Hi

For the given example

Use assign activity to get the output we want

str_date = Split(Strinput.ToString,” “)(1)+ Split(Strinput.ToString,” “)(2)+ Split(Strinput.ToString,” “)(3)

Str_time = Split(Strinput.ToString,” “)(4)

@suryasuhas527

Try below expressions.

       strDate = "Mon, 12 Jul 2021 12:29:55 -0500"
       varDate = CDate(strDate.Split("-"c)(0)).ToString("dd MMM yyyy")
       varTime = CDate(strDate.Split("-"c)(0)).ToString("hh:mm:ss")
2 Likes

@suryasuhas527

If your query resolved then please close this thread by marking appropriate post as solution. So that it will help others who are facing similar issue.