Date and Time each separate Configuration

4
Hi Guys!  I have question. My domain model has dateandtime attribute. I want to show date and time separately on my page. But I am having a problem with the time part. Because I can't choose the time as I want. How can I solve this with a single attribute(dateandtime)? Thanks in advance! KInd regards, Mehmet
asked
2 answers
3

Hi Mehmet,

I can suggest two ways to solve this situation:

1- You can select the same attribute on two different date-time pickers. You can configure the date value in one of the pickers and the time value in the other. I am attaching the relevant pictures.

2- By using two different attributes, you can combine the date data from one of the attributes and the time data from the other. You can convert date-time data to string in Microflow (using Java community Commons), arrange it as you want, and then save it as date-time data again. I hope one of the solutions will help you.

Regards,
Ridvan OKUZ

answered
1

Hello Mehmet Cankurtaran

From your question, I understood that you have a single “Date and Time” attribute and on a page, you want to show the Date part in a separate place and the Time part in a separate place.

You can achieve this by having two text widgets in the page both calling the same attribute. In one place you can select the formatting to show only Date and in the other place, you can select the formatting to show only Time. Mendix also allows you to define custom formats of your choice. Attached is a screenshot of the formatting options available for a Date and Time attribute. 

 

Note : I am using Mendix version 9.12.1 so the options in the screenshots might differ a little if you are using a different version of Mendix 

Hope this helps

Regards

Praharaj Mahaprasad Tripathy

answered