Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » CalendarCtrl » New SetDate for DateTimeCtrl
Re: New SetDate for DateTimeCtrl [message #11338 is a reply to message #11332] Thu, 06 September 2007 11:19 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
DateTimeCtrl::GetData actually returns a Date, which can of course then be converted to a string.
Date d = ~datetime;
String date_string = AsString(d);
...
datetime <<= d;
But even if you only have a String you can still set it directly:
datetime.SetText(date_string);
or
datetime <<= Scan(DATE_V, date_string);
These methods are also preferable because they use the global date format (see SetDateFormat & SetDateScan).

James

[Updated on: Thu, 06 September 2007 11:23]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Update to CalendarCtrl / TimeDateCtrl
Next Topic: DropTime problem
Goto Forum:
  


Current Time: Fri May 10 03:51:30 CEST 2024

Total time taken to generate the page: 0.01998 seconds