Print Page | Close Window

HowTo: Format Date like this

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=4716
Printed Date: 25 November 2024 at 2:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HowTo: Format Date like this
Posted By: Rith
Subject: HowTo: Format Date like this
Date Posted: 03 August 2006 at 9:11am
Hi.
 
how to make a Date-Format like this: 03.08.2006. In my local-Setting it must show like this sample, but the PropertyGrid shows me like this: 03/08/2006 . In the help-files couldnīt find help...
 
hope you understand my Problem...
 
thx for help
 
Thomas Rith
 
(sorry for my english...)
 



Replies:
Posted By: Oleg
Date Posted: 03 August 2006 at 11:50am
Hello, call
pItem->SetFormat(T("%d.%m.%Y");


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Rith
Date Posted: 04 August 2006 at 9:50am

aProperty = aCategorie.AddChildItemBinded(XtremePropertyGrid.PropertyItemType.PropertyItemDate, mObject, "Geburtstag")

aProperty.Caption = "Geburtstag"

aProperty.Description = "Hier bitte das Geburtsdatum eintragen."

aProperty.Format = "%d.%m.%Y"

This is my Code now, but it doesnīt go... ??? !!! Can you help...?


Posted By: Oleg
Date Posted: 04 August 2006 at 10:21am
Hi,
you didn't say about ActiveX and bindings...
 
So just set value again after you change format:
 
aProperty.Value = mObject.Geburtstag


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Rith
Date Posted: 08 August 2006 at 7:57am
thx, this helps.
Thomas Rith


Posted By: larrym
Date Posted: 13 December 2006 at 3:18pm
I'm using VB ActiveX and bindings and am having trouble formatting dates. I used the format suggested above and it 'kind a works'. Dates are show as two digit years. If I use the drop down calendar and select a date it returns 'Invalid Date Time'.
Is there any documentation on valid format strings for the PopertyGrid?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net