![]() |
Report Control - Formatting a date |
Post Reply ![]() |
Author | |
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() 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" 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 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Format the date before you add it. The "Format" property currently does not support this type of formatting.
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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 |