Question
Vodafone
IN
Last activity: 26 Aug 2020 8:17 EDT
Change Date format to MM/YY
Hi All,
I have a business logic, where i need to make the date format change from MM/YY/DD to MM/YY
how can i create a custom control to make it.
-
Likes (1)
Arianna Collia -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi
Sorry for getting back late on this. If my understanding is correct then here is your requirement
1. You want to make the date formate change from MM/YY/DD to MM/YY : We can do it.I have created two properties, one named : DateOfEvent which is of datetime type, and the other named SelectedMonthAndYear of text type. I also created an activity with a single step where I am performing a property set and using the function like this. @DateTime.FormatDateTime(.DateOfEvent,"yyyy-MM",strTimeZone,strLocale)
With help of this activity I am formatting / converting my input date time to only month and year. Find screenshot below :
2. You also want to check whether there is any provision to customize the calendar format so that it only shows month and year and not the dates.
Hi
Sorry for getting back late on this. If my understanding is correct then here is your requirement
1. You want to make the date formate change from MM/YY/DD to MM/YY : We can do it.I have created two properties, one named : DateOfEvent which is of datetime type, and the other named SelectedMonthAndYear of text type. I also created an activity with a single step where I am performing a property set and using the function like this. @DateTime.FormatDateTime(.DateOfEvent,"yyyy-MM",strTimeZone,strLocale)
With help of this activity I am formatting / converting my input date time to only month and year. Find screenshot below :
2. You also want to check whether there is any provision to customize the calendar format so that it only shows month and year and not the dates.
Calendar by default will come up with dates. If you do not want to display dates in a calendar, then I would suggest you to use custom properties having drop down for months and years.
Let me know if you need any further details on this.
Hi Gattupally,
If you are using 'Date Time' control provided by PRPC, you can use the 'date-time format' field in the presentation tab to configure this. Please let me know how this works for you
Cheers,
Shan
Pegasystems Inc.
IN
Hi,
When you said that you want the format change to MM/YY do you also want to change the way it get stored in database ?
Vodafone
IN
Hi Santanu,
Thanks for your reply to the post. With reference to your last reply i would say "Yes", with month / year and time...
I believe Pega doesn't have that format. I see day is mandatory to trigger value from the calendar popup. is there any way to customize it, showing only month and year in the calendar pop up?
Thanks,
Naveen
Accepted Solution
Pegasystems Inc.
IN
Hi
Sorry for getting back late on this. If my understanding is correct then here is your requirement
1. You want to make the date formate change from MM/YY/DD to MM/YY : We can do it.I have created two properties, one named : DateOfEvent which is of datetime type, and the other named SelectedMonthAndYear of text type. I also created an activity with a single step where I am performing a property set and using the function like this. @DateTime.FormatDateTime(.DateOfEvent,"yyyy-MM",strTimeZone,strLocale)
With help of this activity I am formatting / converting my input date time to only month and year. Find screenshot below :
2. You also want to check whether there is any provision to customize the calendar format so that it only shows month and year and not the dates.
Hi
Sorry for getting back late on this. If my understanding is correct then here is your requirement
1. You want to make the date formate change from MM/YY/DD to MM/YY : We can do it.I have created two properties, one named : DateOfEvent which is of datetime type, and the other named SelectedMonthAndYear of text type. I also created an activity with a single step where I am performing a property set and using the function like this. @DateTime.FormatDateTime(.DateOfEvent,"yyyy-MM",strTimeZone,strLocale)
With help of this activity I am formatting / converting my input date time to only month and year. Find screenshot below :
2. You also want to check whether there is any provision to customize the calendar format so that it only shows month and year and not the dates.
Calendar by default will come up with dates. If you do not want to display dates in a calendar, then I would suggest you to use custom properties having drop down for months and years.
Let me know if you need any further details on this.