How to get current date?

Hello,

I’m using Activities.TypeInfo.
And I would like to enter the current date.
Is there such a way?

image01

Use this to get the current date in that particular format:

DateTime.Now.ToString("yyyy/MM/dd")

Thanks,
Rammohan B.

6 Likes

I want to rename my excel file with name of current date and above format is not working there and i am not able to get another option.
any leads will be appreciated.

1 Like

Hey @Himani_Singh

“/” is not supported with filename in windows.

This below thread link will help you on this:

Let me know …!! if you are still facing any prob :slight_smile:

Regards…!!
Aksh

2 Likes

thank you Aksh for your time. I resolved my prob on that day only.:blush:

if I want only month and year
then will it be data.now.ToString(“mm.yyyy”) or
Now.ToString(“mm.yyyy”)

Hello Ram Mohan. I want to insert current date in this format “3rd August, 2021”, without mentioning “weekdays”, which command I should use? please suggest…
i am using “DateTime.Now.ToLongDateString” but it is showing “Tuesday, 03 August 2021”. i want to remove “Tuesday” from this output.

1 Like

i wany (DD-MM-YYYY) this format

Hi @saninfo273

Try this

Now.ToString("dd-MM-yyyy")

Regards,

this code output is “DD-03_YYYY”

@saninfo273

Can you please show the SS how you are trying.I think you are using Now.ToString(“DD-MM-YYYY”)

Don’t do like that Use same format like Now.ToString("dd-MM-yyyy")

1 Like

@saninfo273

Try another ways

or

Cheers!!

1 Like