Extract the Month from date"02/03/1986" in formate "dd/mm/year" using "Remove" expression , Expensedate is in string fomat

@prasanthyadav73 - pls share - Input string & expected output string/value…

hi @prasanthyadav73 ,

You can always use the below to get the Month .

But , If there is must to Use Remove :


Mukesh

Thanks Mukesh
Here in remove expression What are 2,8 referred to.
I cant get

Input string is Date(02/03/1986)
and expected output is Month in a date(03)

Hi @prasanthyadav73,

public string Remove(int StartIndex, int count) method will take two arguments i.e first is start position of specified string and the second one is the number of characters to be removed. The return type value of both the methods is System.String .

Exceptions: There can be two cases where exception ArgumentOutOfRangeException may occur are as follows:

  • Either StartIndex or (StartIndex + count) indicates a position which may outside the current string object.
  • StartIndex or count is less than zero.

We can also Use
image

Here we are telling to remove the characters from 2 to (length-2) - Length will return 10 - so (2,8) - same as above


Mukesh

1 Like

yup, Got it
Thanks for the Respone

1 Like

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