<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CXTPPropertyGridItemDate date formatting</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : CXTPPropertyGridItemDate date formatting]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 07:00:11 +0000</pubDate>
  <lastBuildDate>Mon, 17 Mar 2008 05:34:09 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=9893</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CXTPPropertyGridItemDate date formatting : Hi,     thank you for the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32315&amp;title=cxtppropertygriditemdate-date-formatting#32315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3020">abazosan</a><br /><strong>Subject:</strong> 9893<br /><strong>Posted:</strong> 17 March 2008 at 5:34am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV><DIV>thank you for the reply;</DIV><DIV>&nbsp;</DIV><DIV>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 </DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>pDt-&gt;SetFormatString(_T("")); </FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>but the initial date doesn't appear in the value field (it's just blank)&nbsp;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.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Any ideas why I'm getting that?</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>thank you.</FONT></DIV><DIV><FONT size=2>AB.</FONT></DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 05:34:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32315&amp;title=cxtppropertygriditemdate-date-formatting#32315</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPPropertyGridItemDate date formatting : Hi;  If you call SetDateFormat...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32258&amp;title=cxtppropertygriditemdate-date-formatting#32258</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 9893<br /><strong>Posted:</strong> 14 March 2008 at 6:20am<br /><br />Hi; <DIV>If you call SetDateFormat with an empty string, the format used will be the system date format:<BR><BR><FONT size=2>CXRReportRecordItemDateTime* pDt=DYNAMIC_DOWNCAST(CXRReportRecordItemDateTime, AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXRReportRecordItemDateTime(COleDateTime(dtCreated))));<BR>pDt-&gt;SetFormatString(_T(""));</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>or you can create your own date item and use system API function to build the format strings like this:</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT face="Courier New, Courier, mono" size=2>IMPLEMENT_DYNAMIC(CCustomItemDateEdit, CXTPPropertyGridItemDate)</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>CCustomItemDateEdit::CCustomItemDateEdit(LPCTSTR strCaption, const COleDateTime&amp; oleDate)<BR>&nbsp;: CXTPPropertyGridItemDate(strCaption, oleDate)<BR>{<BR>&nbsp;Init();<BR>}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>CCustomItemDateEdit::CCustomItemDateEdit(UINT uiID, const COleDateTime&amp; aDate)<BR>&nbsp;: CXTPPropertyGridItemDate(uiID, aDate)<BR>{<BR>&nbsp;Init();<BR>}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>CCustomItemDateEdit::~CCustomItemDateEdit()<BR>{<BR>}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>void CCustomItemDateEdit::Init()<BR>{<BR>&nbsp;TCHAR lpIDate&#091;2&#093;;<BR>&nbsp;GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDATE, lpIDate, _countof(lpIDate));<BR>&nbsp;int iDateOrder=_ttoi(lpIDate);<BR>&nbsp;CString strFormat, strMaskFmt, strLiteralFmt;&nbsp;<BR>&nbsp;if (iDateOrder==0)&nbsp;&nbsp;// Month-Day-Year<BR>&nbsp;{<BR>&nbsp;&nbsp;strFormat=_T("%%m%s%%d%s%%Y");<BR>&nbsp;&nbsp;strMaskFmt=_T("00%s00%s0000");<BR>&nbsp;&nbsp;strLiteralFmt=_T("__%s__%s____");<BR>&nbsp;}<BR>&nbsp;else if (iDateOrder==1)&nbsp;// Day-Month-Year<BR>&nbsp;{<BR>&nbsp;&nbsp;strFormat=_T("%%d%s%%m%s%%Y");<BR>&nbsp;&nbsp;strMaskFmt=_T("00%s00%s0000");<BR>&nbsp;&nbsp;strLiteralFmt=_T("__%s__%s____");<BR>&nbsp;}<BR>&nbsp;else if (iDateOrder==2)&nbsp;// Year-Month-Day<BR>&nbsp;{<BR>&nbsp;&nbsp;strFormat=_T("%%Y%s%%m%s%%d");<BR>&nbsp;&nbsp;strMaskFmt=_T("0000%s00%s00");<BR>&nbsp;&nbsp;strLiteralFmt=_T("____%s__%s__");</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>&nbsp;}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>&nbsp;TCHAR lpsDate&#091;4&#093;;<BR>&nbsp;GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, lpsDate, _countof(lpsDate));<BR>&nbsp;m_strFormat.Format(strFormat, lpsDate, lpsDate);<BR>&nbsp;<BR>&nbsp;CString strMask, strLiteral;<BR>&nbsp;strMask.Format(strMaskFmt, lpsDate, lpsDate);<BR>&nbsp;strLiteral.Format(strLiteralFmt, lpsDate, lpsDate);<BR>&nbsp;SetMask(strMask, strLiteral);</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>&nbsp;SetDate(GetDate());<BR>}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono" size=2>CString CCustomItemDateEdit::Format(const COleDateTime&amp; oleDate)<BR>{<BR>&nbsp;if (oleDate.GetStatus() != COleDateTime::valid)<BR>&nbsp;&nbsp;return _T("");</FONT></DIV><DIV><FONT size=2><FONT face="Courier New, Courier, mono">&nbsp;return oleDate.Format(VAR_DATEVALUEONLY);<BR>}<BR></FONT></DIV></BLOCKQUOTE></FONT>]]>
   </description>
   <pubDate>Fri, 14 Mar 2008 06:20:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32258&amp;title=cxtppropertygriditemdate-date-formatting#32258</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPPropertyGridItemDate date formatting : Hi there,   I&amp;#039;m trying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32257&amp;title=cxtppropertygriditemdate-date-formatting#32257</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3020">abazosan</a><br /><strong>Subject:</strong> 9893<br /><strong>Posted:</strong> 14 March 2008 at 6:15am<br /><br />Hi there, <DIV>&nbsp;</DIV><DIV>I'm trying to change the date format of a CXTPPropertyGridItemDate item in order to set the SYSTEM date format.</DIV><DIV>&nbsp;</DIV><DIV></DIV><DIV>In the docs I've just seen the method 'SetDateFormat'&nbsp;that gets a string argument but I don't&nbsp;know how to build a string&nbsp;&nbsp;with the system date format.</DIV><DIV>&nbsp;</DIV><DIV>Is there any other way to set the dateformat of the control or make it to get the system format?</DIV><DIV>&nbsp;</DIV><DIV>thank you in advance,</DIV><DIV>AB.</DIV>]]>
   </description>
   <pubDate>Fri, 14 Mar 2008 06:15:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9893&amp;PID=32257&amp;title=cxtppropertygriditemdate-date-formatting#32257</guid>
  </item> 
 </channel>
</rss>