TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
try abc
1.4k
306
488.2k
Problem with DateTime Format
Aug 11 2008 9:05 AM
Hello All,
Currntly i am working on a One database application..there is date Format setting for User to change the Date format Withing Application. It is {MM/dd/yyyy} Or (dd/MM/yyyy). Only this two format is allowed through out the application. I am storing every date from applicaiton to database in "MM/dd/yyyy" format. and when retriving i am displying in the format choosen by user in Application.. Ites Works fine on my Pc. but when i installed it in client pc it gives a Errorr stating"String was not recognized as a Valid Datetime".. Does it related to CulterInfo.. ??? Currently My Pc's Currrnt Culture is "English(United States)".
If it related to it How to assign Datefromat and Culture Info.
I am Using the Following code to convert format of date
Convert.ToDateTime(_VardtFromDb).ToString(_VarDateFormat);
here,
_VardtFromDb
comes form Database and it is in "MM/dd/yyyy" format
_VarDateFormat
is the format specified by User . and it is one of (MM/dd/yyyy) Or {dd/MM/yyyy}
Reply
Answers (
5
)
Syntax validator for Javascript
Column X does not belong to table Y strange error