Click here to Skip to main content
15,886,689 members
Home / Discussions / C#
   

C#

 
AnswerRe: I want a project in c#.net Pin
OriginalGriff14-Oct-14 20:07
mveOriginalGriff14-Oct-14 20:07 
QuestionChange the datetime variable output to a specific format Pin
nitin_ion14-Oct-14 7:40
nitin_ion14-Oct-14 7:40 
QuestionRe: Change the datetime variable output to a specific format Pin
Kornfeld Eliyahu Peter14-Oct-14 7:44
professionalKornfeld Eliyahu Peter14-Oct-14 7:44 
AnswerRe: Change the datetime variable output to a specific format Pin
nitin_ion14-Oct-14 8:03
nitin_ion14-Oct-14 8:03 
AnswerRe: Change the datetime variable output to a specific format Pin
Kornfeld Eliyahu Peter14-Oct-14 8:06
professionalKornfeld Eliyahu Peter14-Oct-14 8:06 
GeneralRe: Change the datetime variable output to a specific format Pin
nitin_ion14-Oct-14 8:12
nitin_ion14-Oct-14 8:12 
SuggestionRe: Change the datetime variable output to a specific format PinPopular
Kornfeld Eliyahu Peter14-Oct-14 8:23
professionalKornfeld Eliyahu Peter14-Oct-14 8:23 
GeneralRe: Change the datetime variable output to a specific format Pin
Dave Kreskowiak14-Oct-14 12:57
mveDave Kreskowiak14-Oct-14 12:57 
nitin_ion wrote:
I want the DateTime it self to return in the specific format and not as string


There is no such thing!

What you see on screen is ALWAYS a string representation of the data in a DateTime structure. There is NO FORMAT in a DateTime value. It is just a bunch of numbers that represents a Date/Time. The only way you get to see the value is if it is converted to some string format. That format is anything you chose.

Now, if you're looking in Visual Studio, it uses the systems culture information as a default format.


Now, if you stored your Dates in your database as a string, you SERIOUSLY screwed yourself. DateTime should ALWAYS be stored in the database as a DateTime type, NEVER as a string.

Why? Because because as a string representation, any DateTime comparisons or lookups will be done using character string rules, NOT DateTime rules. The two sets of rules are work very differently from each other.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

AnswerRe: Change the datetime variable output to a specific format Pin
Eddy Vluggen14-Oct-14 8:11
professionalEddy Vluggen14-Oct-14 8:11 
AnswerRe: Change the datetime variable output to a specific format Pin
V.14-Oct-14 21:54
professionalV.14-Oct-14 21:54 
QuestionIssue with visual studio 2013 profiler : Bottom of stackfunction Pin
Member 1112014714-Oct-14 6:41
Member 1112014714-Oct-14 6:41 
QuestionFCL C# source code Pin
Member 1115157113-Oct-14 22:10
Member 1115157113-Oct-14 22:10 
AnswerRe: FCL C# source code Pin
OriginalGriff13-Oct-14 22:33
mveOriginalGriff13-Oct-14 22:33 
AnswerRe: FCL C# source code Pin
Pete O'Hanlon13-Oct-14 23:34
mvePete O'Hanlon13-Oct-14 23:34 
GeneralRe: FCL C# source code Pin
OriginalGriff14-Oct-14 1:04
mveOriginalGriff14-Oct-14 1:04 
GeneralRe: FCL C# source code Pin
Pete O'Hanlon14-Oct-14 3:42
mvePete O'Hanlon14-Oct-14 3:42 
AnswerRe: FCL C# source code Pin
Eddy Vluggen14-Oct-14 4:58
professionalEddy Vluggen14-Oct-14 4:58 
QuestionRAPI2 in C# not returning multiword Pin
Spidy113-Oct-14 19:22
Spidy113-Oct-14 19:22 
AnswerRe: RAPI2 in C# not returning multiword Pin
Richard MacCutchan13-Oct-14 21:53
mveRichard MacCutchan13-Oct-14 21:53 
GeneralRe: RAPI2 in C# not returning multiword Pin
Spidy114-Oct-14 14:00
Spidy114-Oct-14 14:00 
Questionporting from XNA to MonoGame Pin
paulrm13-Oct-14 6:25
paulrm13-Oct-14 6:25 
AnswerRe: porting from XNA to MonoGame Pin
Richard MacCutchan13-Oct-14 6:37
mveRichard MacCutchan13-Oct-14 6:37 
GeneralRe: porting from XNA to MonoGame Pin
paulrm13-Oct-14 6:59
paulrm13-Oct-14 6:59 
GeneralRe: porting from XNA to MonoGame Pin
Pete O'Hanlon13-Oct-14 10:55
mvePete O'Hanlon13-Oct-14 10:55 
AnswerRe: porting from XNA to MonoGame Pin
Gerry Schmitz13-Oct-14 11:25
mveGerry Schmitz13-Oct-14 11:25 

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.