Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - CXTPReportRecordItemDateTime Format
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportRecordItemDateTime Format

 Post Reply Post Reply
Author
Message
freediver211 View Drop Down
Newbie
Newbie
Avatar

Joined: 29 June 2006
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote freediver211 Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportRecordItemDateTime Format
    Posted: 15 November 2006 at 11:09am
I have added a COleDateTimefield to my CXTPReportControl as per the examples provided.  My question is how can I format the date/time?
 
I tried to set the COleDateTime format string but that doesn't appear to be working.
 
Any suggestions? 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 15 November 2006 at 12:22pm
Hi,

If your item is derived from CXTPReportRecordItemDateTime, then you can change a formatting string by calling .SetFormatString(format).

Date/time value is formatted using regular COleDateTime Format method. Default formatting string is "%a %b/%d/%Y %I:%M %p"

--
WBR,
Serge
Back to Top
freediver211 View Drop Down
Newbie
Newbie
Avatar

Joined: 29 June 2006
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote freediver211 Quote  Post ReplyReply Direct Link To This Post Posted: 15 November 2006 at 1:43pm
Thanks!  This fixed it. 
 
I wish in the CodeJock help files this method was included under CXTPReportRecordItemDateTime.
Back to Top
staffanv View Drop Down
Newbie
Newbie
Avatar

Joined: 16 August 2010
Location: Sweden
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote staffanv Quote  Post ReplyReply Direct Link To This Post Posted: 16 August 2010 at 10:39am
But how do I do if I want to format it according to user regional settings?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.