开发者

DateTime in the dynamic data framework

开发者 https://www.devze.com 2023-01-07 18:14 出处:网络
I am using the Dynamic Data framework with scaffolding. Quite nice for a small home database that I am creating.

I am using the Dynamic Data framework with scaffolding. Quite nice for a small home database that I am creating.

I notice though that if I create a field in the database of type 'date' (not datetime) the value is shown in the dynamic data site as a datetime. i.e. as this,

1/1/2010 12:00am

I just want it to display 1/1/2010 as the underlying data type is just a date, and I have no need to store times too.

I 开发者_如何学JAVAhave the scaffolding set up, is there some kind of attribute I can use to specify the format?


Use DataTypeAttribute(DataType.Date) as your property metadata annotation.

0

精彩评论

暂无评论...
验证码 换一张
取 消