Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
i have created one table for category items...in that i mentioned lastupdateddate of type datetime datatype...i m developing this application in 3 tier architecture...in business layer how to mention the datetime datatype and how to convert it in date time to save in table
Posted 30-Mar-12 3:32am
Comments
pashad at 30-Mar-12 9:36am
   
can you give a simple code example??
in which data type you want to convert it.?
and please clarify this "in business layer how to mention the datetime datatype and how to convert it in date time to save in table"
am really unable to get it.?
Mark Nischalke at 30-Mar-12 10:02am
   
Pretend that we are not sitting next to you and have been working on the project the entire time. Now, explain what you want to accomplish, what you have tried and what problems you are encountering.
wizardzz at 30-Mar-12 10:48am
   
You aren't psychic?
Mark Nischalke at 30-Mar-12 10:58am
   
They took that power away from me when I was exiled on this planet.
Wes Aday at 30-Mar-12 11:50am
   
Why do you need to convert a DateTime type to a DateTime type to begin with?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Many of the .NET types support the TypeConverter:
TypeConverter converter = TypeDescriptor.GetConverter(targetType);
return converter.ConvertFrom(value);
You can read about it in my article ^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 mhegazy94 460
1 Sergey Alexandrovich Kryukov 405
2 Kornfeld Eliyahu Peter 275
3 Gihan Liyanage 163
4 Sibeesh KV 156
0 Sergey Alexandrovich Kryukov 6,775
1 OriginalGriff 6,696
2 CPallini 5,345
3 George Jonsson 3,599
4 Gihan Liyanage 2,751


Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 30 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100