A
A
azaznioo2015-04-15 22:53:12
HTML
azaznioo, 2015-04-15 22:53:12

Why does the c# part of the conversion function and the various data types work strangely (or not work at all) on Windows with different languages?

Especially this problem concerns the conversion from string to DateTime

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Pukhov, 2015-04-16
@Neuroware

the date format may differ depending on the language, for example, the date can be written 12/25/2015 or 2015\12\25 and this and that date, but you need to read it differently

V
Valery Okhotnikov, 2015-04-15
@vox13

https://msdn.microsoft.com/en-us/library/system.if... (v=vs.110).aspx

I
Ivan Arxont, 2015-04-17
@arxont

Because you don't need to convert :) Ideally, you should store the time in DateTime format (you can still store UTC, but this is not needed anywhere). And for I/O use CultureInfo.CurrentCulture + https://msdn.microsoft.com/en-us/library/5hh873ya(...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question