DateTime as Extended Attribute

rated by 0 users
This post has 1 Reply | 1 Follower

TechLINKS
Top 500 Contributor
Posts 46
Points 720
By: TechLINKS
Posted: Fri, Jul 18 2008 10:27 AM

what is the best way to convert a DateTime variable to a string and back again?

 

 
TechLINKS
Top 500 Contributor
Posts 46
Points 720
By: TechLINKS
Posted: Fri, Jul 18 2008 10:40 AM In reply to

AAAh, solved my own problem.

String -> Date

 

 

 

string start = weblog.GetExtendedAttribute("StartDate");

 

 

this.StartDate.DateTime = DateTime.ParseExact(start, "MMMM, dd, YYYY", null);

Date->String

string

start = this.StartDate.DateTime.ToString("MMMM, dd, YYYY", null);

 

 
  • Post Points: 5 |
Page 1 of 1 (2 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com