Date and Time for UI path studio automation

Hi there, I need a help for UI path automation.
I want to create a logic about start time and end date.
How do I create for this below :

If Date < 7th of current month
Start date = 1st of previous month
End date = 20th of current month

Else If Date > 7th of current month
Start date = 1st of current month
End date = Last day of current month

Can someone give me an answer to this?
Really could need some help.

@jnarthan.g
Let me check
DateTime.xaml (7.8 KB)
Post Updated

Hi,

How about the following sample? We can achieve it using ModifyDate activity.

Sample20230310-3L.zip (2.8 KB)

Regards,

Hi @jnarthan.g

Give a try to this
DateTime.xaml (7.6 KB)

Hope this helps.

1 Like

Let me have a look ya. Will reply in a while

Alright. Thank you very much ya. Let me have a look and try it and get back to you.

Really helps a lot. Really much appreciated.

Thank you.

Regards.

1 Like

@jnarthan.g post updated

Hi do you happen to know how to extract date from outlook email?
Could you help me out?
The one that you send its been successful. But I need a way to extract the date from the outlook email with the below code that you send me.

If Date < 7th of current month
Start date = 1st of previous month
End date = 20th of current month

Else If Date > 7th of current month
Start date = 1st of current month
End date = Last day of current month

Hi @jnarthan.g
Give a try to this
mailMessage.Headers(“Date”)

Sorry I don’t get you. Where should I insert this ?

Hi @jnarthan.g
mailMessage has list of mail available. Loop through this and get the required mail date.

1 Like

Hi bro thanks and it was success the one you gave me.
Do you know how to link this code to email?

The date suppose to be extract from the email.
Do you have any ideas to do so.

Regards,

@jnarthan.g


If you want to get date for all emails then you need to put mailmessages over loop.

1 Like

@jnarthan.g
updated code.
DateTime.xaml (9.6 KB)

@jnarthan.g
Code for each email.
DateTime.xaml (11.9 KB)

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