I wonder if someone know how can I model a DateTime primitive type in properties using UML?
Asked
Active
Viewed 7,672 times
1 Answers
5
I guess it depends of the format of date ... Please see below an example where I model a date (as UML DataType) with two integers respectively the day and the year and a UML Enumaration named "Month" for the month. Of course, you can add some parts (UML Property) at the DateTime for the hour, minutes, etc. You can also choose to model the Month by an integer
Hoping it helps.

Red Beard
- 3,436
- 1
- 14
- 17
-
Hi @Red Beard i noticed from your answer #what you are model is called a user defined datatype? #did i need to draw associations among class and datatype and enumeration? #in Modelio there is a predefined date type,date but i really don't know how can i deal with?is it differe from Date that you provide? #look at the following example datetime: http://imageshack.us/photo/my-images/713/datetimey.png/ – Chriss Feb 04 '13 at 20:45
-
Hi @Chriss, #yes I used an user defined datatype because I guess taht in strict UML primitive type can not have internal structure which is not the choice I made here. #You did not need to draw associations these elements, you have just to model their types. # I am not sure about the structure of the predefined Modelio date data type and I would show how I would model a Date under an UML tool not only Modelio. #Your example seems good and clear for me. – Red Beard Feb 05 '13 at 07:31
-
Hi @RedBeard. Is it ok in UML class diagram to leave the bottom left and the right diagram? – kzs Oct 10 '18 at 10:03
-
to leave the bottom left and the right diagram? Why did you mean by that? – Red Beard Oct 16 '18 at 14:18