Which one of the following is preferably used when creating an attribute containing data on when something was established:
?
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.
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"