Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

asp.net, c# Time with "T"

<DateTimeSent>2017-06-15T14:49:19-07:00</DateTimeSent>

I would like to convert like 06/15/17 with time (without sec). how can I do that in c#?
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

You may try something like:
            string timeF = "2017-06-15T14:49:19-07:00";
            DateTime dt = DateTime.Parse(timeF);
            string timeS = dt.ToString("MM/dd/yy");

Open in new window

code please... how do you put that value into that element
Avatar of ITsolutionWizard

ASKER

anarki_jimbel: I need the time as well (without sec.). That is what I asked in the question...
SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The format options is the 'best' way to go.