October 7th, 2003, 02:41 PM
Converting date ?
guys I still need your help out there.
My program read a date in a DataBase, then it add it to a texbox.
but my problem is that Windows convert that date to fit it's setting.
the format of the date in my DataBase : 2003-10-07
the format of windows : jj-mm-aaaa
so format of my text box will be : 07-10-2003
cause windows convert it. But I don't want him to convert it like that, I want it to stay normal.
Cause when I try to record the date in the fomat jj-mm-aaaa in my database (format aaaa-mm-jj) it won't do it cause it's not the same Format of DateTime.
Damn now how can I fix that in my program ? cause the program is on different station and they don't all use the same style of dates etc... is there a way to fix it ?
I tryed to do a parse or something ! or something like a toformat of something ! but I just don't see how !
may be someone already got that problem before ?
October 8th, 2003, 12:33 AM
Application.CurrentCulture contains all the culture information and formating that .NET uses for a given workstation. Also useful is the System.Globalization namespace.
October 8th, 2003, 12:46 PM
Thank you ! I appreciate it ! I worked another way to solve it cause I didn't know that ! but for the next time it's great !
I appreciate !
now do you know how I put a Cell in a Database that is in form of a Date into a Null. Cause when you create a new row, the value is set at Null but then it's got a date in it, but if the date is erase it's need to get back to null. I tryed to use = dbnull.value but you can't convert a date into a Null ! that's kinda weird.