0

Which one of the following is preferably used when creating an attribute containing data on when something was established:

  • "String"
  • "Text"
  • "Date"
  • "Date/Time"

?

Researching, I found that both "String" and "Date" should be able to create "(YYYY-MM-DD)" equally well.

I also found earlier posts here on SO with titles like this one: How to convert date(string type) into date(date time ) in oracle

Obviously there's a point I've missed here. Surely there's a benefit for using one over the other.

(I'm working in MDriven)

Many thanks.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
Gustaf
  • 147
  • 5
  • I think, this question is not UML or MDriven issue. MDriven uses .NET Framework. You can find differences between them in C# or VB.NET easily. – Gholamali Irani Jan 21 '18 at 15:54
  • Well it's MDriven, whereby UML I'm working in and that's where I'm implementing the attributes to classes. I didn't know about the VB.NET though, will use it in the future – Gustaf Jan 24 '18 at 20:43

1 Answers1

2

DateTime should be correct. You may also achieve this in MDriven by using a superclass that by inheritance gives all your objects a set of attributes for creation and change. This will give you "automatic" support, if you want the user to enter, then use an attribute with type "DateTime"