Click here to Skip to main content
15,906,333 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem in Date Format Pin
CrazyCoder2627-Apr-09 19:52
CrazyCoder2627-Apr-09 19:52 
GeneralRe: Problem in Date Format Pin
Abhijit Jana27-Apr-09 20:27
professionalAbhijit Jana27-Apr-09 20:27 
AnswerRe: Problem in Date Format Pin
nithydurai27-Apr-09 20:34
nithydurai27-Apr-09 20:34 
GeneralRe: Problem in Date Format Pin
Abhijit Jana27-Apr-09 20:36
professionalAbhijit Jana27-Apr-09 20:36 
GeneralRe: Problem in Date Format Pin
nithydurai27-Apr-09 20:41
nithydurai27-Apr-09 20:41 
AnswerRe: Problem in Date Format [modified] Pin
SayreCC27-Apr-09 20:48
SayreCC27-Apr-09 20:48 
GeneralRe: Problem in Date Format Pin
Abhijit Jana27-Apr-09 21:02
professionalAbhijit Jana27-Apr-09 21:02 
AnswerRe: Problem in Date Format Pin
Kaushal Arora28-Apr-09 6:35
Kaushal Arora28-Apr-09 6:35 
Hi,

Try using this code, this is a bit lengthy work but is useful in these type of cases.

// First Split the Textbox text on '/' <br />
string[] arrdate = textbox1.Text.Split('/');<br />
<br />
//Get the Splitted values in variable, You can also use them directly in the followed statement used to create DateTime. <br />
<br />
int year = Convert.ToInt32(arrdate[2].ToString());<br />
int month = Convert.ToInt32(arrdate[1].ToString());<br />
int day = Convert.ToInt32(arrdate[0].ToString());<br />
<br />
<br />
// Now create a new Datetime variable <br />
DateTime myDt = new DateTime(year, month, day);<br />
<br />
// Or you can write like this<br />
DateTime myDt = new DateTime(Convert.ToInt32(arrdate[2].ToString()), Convert.ToInt32(arrdate[1].ToString()), Convert.ToInt32(arrdate[0].ToString()));<br />
<br />
// Here is you Datetime variable. 


Regards,
Kaushal Arora

Please mark as Answer if it solved your problem.
QuestionHow to assign an xml result that is generated by a stored procedure to a local variable in sql Pin
mukhtharsal27-Apr-09 19:41
mukhtharsal27-Apr-09 19:41 
AnswerRe: How to assign an xml result that is generated by a stored procedure to a local variable in sql Pin
Abhijit Jana27-Apr-09 19:51
professionalAbhijit Jana27-Apr-09 19:51 
QuestionHow to assign an xml result that is generated by a stored procedure to a local variable in sql Pin
mukhtharsal27-Apr-09 19:39
mukhtharsal27-Apr-09 19:39 
AnswerRe: How to assign an xml result that is generated by a stored procedure to a local variable in sql Pin
Ramesh Swaminathan28-Apr-09 0:28
Ramesh Swaminathan28-Apr-09 0:28 
GeneralRe: How to assign an xml result that is generated by a stored procedure to a local variable in sql Pin
mukhtharsal28-Apr-09 2:58
mukhtharsal28-Apr-09 2:58 
Questionwaitng picture in asp.net 1.1 Pin
Jagz W27-Apr-09 18:58
professionalJagz W27-Apr-09 18:58 
AnswerRe: waitng picture in asp.net 1.1 Pin
SayreCC27-Apr-09 19:03
SayreCC27-Apr-09 19:03 
AnswerRe: waitng picture in asp.net 1.1 Pin
Baran M27-Apr-09 19:22
Baran M27-Apr-09 19:22 
GeneralRe: waitng picture in asp.net 1.1 Pin
Jagz W27-Apr-09 19:56
professionalJagz W27-Apr-09 19:56 
GeneralRe: waitng picture in asp.net 1.1 Pin
Baran M27-Apr-09 23:08
Baran M27-Apr-09 23:08 
GeneralRe: waitng picture in asp.net 1.1 Pin
Jagz W28-Apr-09 0:35
professionalJagz W28-Apr-09 0:35 
AnswerRe: waitng picture in asp.net 1.1 Pin
saanj28-Apr-09 21:18
saanj28-Apr-09 21:18 
QuestionProgress Bar Pin
248912827-Apr-09 18:29
248912827-Apr-09 18:29 
AnswerRe: Progress Bar Pin
SayreCC27-Apr-09 18:38
SayreCC27-Apr-09 18:38 
JokeRe: Progress Bar Pin
Abhijit Jana27-Apr-09 19:20
professionalAbhijit Jana27-Apr-09 19:20 
QuestionCase In linq To Sql Pin
ais0727-Apr-09 18:25
ais0727-Apr-09 18:25 
AnswerRe: Case In linq To Sql Pin
SayreCC27-Apr-09 18:43
SayreCC27-Apr-09 18:43 

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.