Split the date

A

ajash.pv

i want to split date as date ,month, year, from the input like
value of textbox1.text="03/06/2007"

i want it like

03(month)

06(day)

2007(year)

separately, and want to store each value in different integer
variables

plz send coding....
 
G

Guest

Hi

try

DateTime dt = DateTime.ParseExact("03/06/2007","MM/dd/yyyy",null);
dt.Month
dt.Year
dt.Day

Adlai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top