CXTPPropertyGridItemDate date formatting |
Post Reply |
Author | |
abazosan
Newbie Joined: 24 May 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 14 March 2008 at 6:15am |
Hi there,
I'm trying to change the date format of a CXTPPropertyGridItemDate item in order to set the SYSTEM date format.
In the docs I've just seen the method 'SetDateFormat' that gets a string argument but I don't know how to build a string with the system date format.
Is there any other way to set the dateformat of the control or make it to get the system format?
thank you in advance,
AB.
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi;
If you call SetDateFormat with an empty string, the format used will be the system date format:
CXRReportRecordItemDateTime* pDt=DYNAMIC_DOWNCAST(CXRReportRecordItemDateTime, AddItem(new CXRReportRecordItemDateTime(COleDateTime(dtCreated)))); pDt->SetFormatString(_T("")); or you can create your own date item and use system API function to build the format strings like this:
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
abazosan
Newbie Joined: 24 May 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Hi,
thank you for the reply;
I choose the first one because a quick date formatting is enough for me, and it seems to be taken the system format doing a
pDt->SetFormatString(_T(""));
but the initial date doesn't appear in the value field (it's just blank) and when I select a date from de pop up calendar, the control is not showing me the date I've just choosen. It only shows __/__/____ and nothing else.
Any ideas why I'm getting that?
thank you.
AB.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |