Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Report Control - Formatting a date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control - Formatting a date

 Post Reply Post Reply
Author
Message
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Topic: Report Control - Formatting a date
    Posted: 09 August 2004 at 5:00am

Hi,

I was wondering if someone could advise me on the best way to format a date in the report control.

Assume I have entered Record.AddItem "09/08/2004 10:56:20"
But I want it displayed "9th August 2004"

Is this something I could use .format to do? If so could you please provide example showing how?

or would it be best to do it in the _BeforeDrawRow event?

or should I format it before I enter it into the report control?

Thanks

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2004 at 6:22am
Format the date before you add it.  The "Format" property currently does not support this type of formatting. 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2005 at 11:34am
The Format property can now be used to set the date format.

    '%a Abbreviated weekday name
    '%A Full weekday name
    '%b Abbreviated month name
    '%B Full month name
    '%c Date and time representation appropriate for locale
    '%d Day of month as decimal number (01 – 31)
    '%H Hour in 24-hour format (00 – 23)
    '%I Hour in 12-hour format (01 – 12)
    '%j Day of year as decimal number (001 – 366)
    '%m Month as decimal number (01 – 12)
    '%M Minute as decimal number (00 – 59)
    '%p Current locale’s A.M./P.M. indicator for 12-hour clock
    '%S Second as decimal number (00 – 59)
    '%U Week of year as decimal number, with Sunday as first day of week (00 – 53)
    '%w Weekday as decimal number (0 – 6; Sunday is 0)
    '%W Week of year as decimal number, with Monday as first day of week (00 – 53)
    '%x Date representation for current locale
    '%X Time representation for current locale
    '%y Year without century, as decimal number (00 – 99)
    '%Y Year with century, as decimal number
    '%z, %Z Time-zone name or abbreviation; no characters if time zone is unknown
    '%% Percent sign
    '%#c Long date and time representation, appropriate for current locale. For example: “Tuesday, March 14, 1995, 12:41:29”.
    '%#x Long date representation, appropriate to current locale. For example: “Tuesday, March 14, 1995”.
    '%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading zeros (if any).


    Item.Format = "%a %m/%d/%Y %I:%M %p"


Edited by SuperMario
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.031 seconds.