Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Few questions Pin
Saksida Bojan28-Dec-09 8:50
Saksida Bojan28-Dec-09 8:50 
GeneralRe: Few questions Pin
ProtoBytes28-Dec-09 9:15
ProtoBytes28-Dec-09 9:15 
AnswerRe: Few questions Pin
DaveyM6928-Dec-09 10:42
professionalDaveyM6928-Dec-09 10:42 
GeneralRe: Few questions Pin
Saksida Bojan28-Dec-09 11:33
Saksida Bojan28-Dec-09 11:33 
GeneralRe: Few questions Pin
ProtoBytes28-Dec-09 12:12
ProtoBytes28-Dec-09 12:12 
QuestionNetwork permission for Windows service Pin
Priya Prk28-Dec-09 4:56
Priya Prk28-Dec-09 4:56 
AnswerRe: Network permission for Windows service Pin
Blikkies28-Dec-09 5:33
professionalBlikkies28-Dec-09 5:33 
AnswerRe: Network permission for Windows service Pin
Dave Kreskowiak28-Dec-09 5:33
mveDave Kreskowiak28-Dec-09 5:33 
GeneralRe: Network permission for Windows service Pin
Priya Prk28-Dec-09 6:07
Priya Prk28-Dec-09 6:07 
Question[Message Deleted] Pin
santhosh-padamatinti28-Dec-09 2:14
santhosh-padamatinti28-Dec-09 2:14 
AnswerRe: please answer Pin
Dave Kreskowiak28-Dec-09 3:56
mveDave Kreskowiak28-Dec-09 3:56 
Questioninsert datetime to database Pin
Erdinc2728-Dec-09 1:48
Erdinc2728-Dec-09 1:48 
AnswerRe: insert datetime to database Pin
OriginalGriff28-Dec-09 2:14
mveOriginalGriff28-Dec-09 2:14 
GeneralRe: insert datetime to database Pin
Erdinc2728-Dec-09 2:53
Erdinc2728-Dec-09 2:53 
GeneralRe: insert datetime to database Pin
Blue_Boy28-Dec-09 3:12
Blue_Boy28-Dec-09 3:12 
GeneralRe: insert datetime to database Pin
Luc Pattyn28-Dec-09 3:26
sitebuilderLuc Pattyn28-Dec-09 3:26 
GeneralRe: insert datetime to database Pin
OriginalGriff28-Dec-09 4:13
mveOriginalGriff28-Dec-09 4:13 
Glad it works - just to add the the other replies, when you read it from the database, keep it as a DateTime:
MySqlCommand cmd;
cmd = new MySqlCommand("SELECT date FROM myTable" +
                       " WHERE userId=@ID");
cmd.Parameters.AddWithValue("@ID", userId);
DataTable dt = Utilities.GetData(cmd);
if ((dt.Rows != null) && (dt.Rows.Count > 0))
    {
    DataRow dr = dt.Rows[0];
    DateTime lastGoodLogin = (DateTime)dr["date"];
    ...
    }
Then just format it as you wish when you need to present it to the user, either in a report on on-screen. DateTime (both DB and .NET) are an internal format - similar to "milliseconds since Jan 1st 2009" but with an internal date you (and I) don't need to know.

All those who believe in psycho kinesis, raise my hand.

Questionfetch distinct record from the custom data type in ado.net entity framework Pin
Pankaj Saha27-Dec-09 22:29
Pankaj Saha27-Dec-09 22:29 
Questionhow do i differentiate between the two tables Pin
@nisha 2n27-Dec-09 22:24
@nisha 2n27-Dec-09 22:24 
AnswerRe: how do i differentiate between the two tables Pin
ProtoBytes28-Dec-09 10:52
ProtoBytes28-Dec-09 10:52 
GeneralRe: how do i differentiate between the two tables Pin
@nisha 2n28-Dec-09 21:24
@nisha 2n28-Dec-09 21:24 
QuestionHow to extract image content from a tif/jpeg/bmp images Pin
RameshwerE27-Dec-09 22:15
RameshwerE27-Dec-09 22:15 
AnswerRe: How to extract image content from a tif/jpeg/bmp images Pin
0x3c027-Dec-09 22:22
0x3c027-Dec-09 22:22 
QuestionWhy Dns.Resolve Method in C# is obsolete ? Workaround? Pin
ksaw12327-Dec-09 21:23
ksaw12327-Dec-09 21:23 
AnswerRe: Why Dns.Resolve Method in C# is obsolete ? Workaround? Pin
Mirko198027-Dec-09 21:52
Mirko198027-Dec-09 21:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.