Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 06, 2012 03:15 PM by EnenDaveyBoy
Participant
1465 Points
1147 Posts
Nov 06, 2012 01:35 PM|LINK
Hi
I have a model which has a datetime property, when I create a new instance of the model in the debugger I can see the datetime is 00/00/000 00:00, now I want to be able to check is the value has changed and if not I want to make it DateTime.Now
All-Star
135148 Points
21679 Posts
Moderator
MVP
Nov 06, 2012 01:48 PM|LINK
retrieve from database storage the Model
Compare with the value has changed with what MVC post.
if not, make it DateTime.Now
Contributor
3216 Points
710 Posts
Nov 06, 2012 01:49 PM|LINK
Can you be a little more specific on "I want to be able to check if the value has changed"? What value specifically?
Nov 06, 2012 03:15 PM|LINK
Thanks got it working, it was an issue with how I had automapper set up
EnenDaveyBoy
Participant
1465 Points
1147 Posts
How do I check DateTime
Nov 06, 2012 01:35 PM|LINK
Hi
I have a model which has a datetime property, when I create a new instance of the model in the debugger I can see the datetime is 00/00/000 00:00, now I want to be able to check is the value has changed and if not I want to make it DateTime.Now
ignatandrei
All-Star
135148 Points
21679 Posts
Moderator
MVP
Re: How do I check DateTime
Nov 06, 2012 01:48 PM|LINK
retrieve from database storage the Model
Compare with the value has changed with what MVC post.
if not, make it DateTime.Now
JohnLocke
Contributor
3216 Points
710 Posts
Re: How do I check DateTime
Nov 06, 2012 01:49 PM|LINK
Can you be a little more specific on "I want to be able to check if the value has changed"? What value specifically?
EnenDaveyBoy
Participant
1465 Points
1147 Posts
Re: How do I check DateTime
Nov 06, 2012 03:15 PM|LINK
Thanks got it working, it was an issue with how I had automapper set up