473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Format time to display hh:mm AM/PM in the calendar block area

I have another question re: Access Calendar, Wide Calendar w/Switchboard.

Currently the time format in the calendar block, display like 03:00:00 PM, Hour:Minutes:Seconds AM/PM.

Even though the code below appears to be formated Not to display seconds, time is still displayed as noted above.

Expand|Select|Wrap|Line Numbers
  1. strEventTime = Format(strStartTime, "h:mm AM/PM")
I looked at another code, below... Modified it, and still no change!
Expand|Select|Wrap|Line Numbers
  1. Me.Caption = "Access Calendar (" & Format$(Now(), "dddd - mmmm dd, yyyy hh:mm:ss AM/PM") & ")"
The query returns the correct format in the details section for each appointment, so it is not the query that need re-formating.

How do I re-format the time to display only hh:mm AM/PM in the calendar block area? Is it possible?
Nov 3 '11 #1
3 5411
NeoPa
32,556 Expert Mod 16PB
Edward Polite:
How do I re-format the time to display only hh:mm AM/PM in the calendar block area?
What exactly is the calendar block area?

Whatever it is, I suspect you need to look at the format property for it. You can use the Format() function to effect the actual data stored there, but that has no real effect on what is displayed. That is reserved for the .Format property. A different animal completely.

Let us know how you get on with this.
Nov 11 '11 #2
NeoPa, I followed your lead, and it took some time to figure it all out, but I modified lines 3 & 5 below by inserting the following code (Format(rstEvents![Start Time], "h:mm AMPM")) to get the results I was looking for in the "txtDayBlock" areas. Thank you for pointing me in the right direction!

Expand|Select|Wrap|Line Numbers
  1. Select Case lngEachDateInRange
  2. Case lngFirstDateInRange        '1st Date in Range, no existing Text
  3.     astrCalendarBlocks(bytBlockCounter) = rstEvents![Title] & " - " & rstEvents![Start Time]
  4. Case lngLastDateInRange         'Last Date in Range, no existing Text
  5.     astrCalendarBlocks(bytBlockCounter) = rstEvents![Title] & " - " & rstEvents![End Time]
  6. Case Else                       'Date Between 1st and Last in Range, no existing Text
  7.     astrCalendarBlocks(bytBlockCounter) = rstEvents![Title]
  8. End Select
Nov 17 '11 #3
NeoPa
32,556 Expert Mod 16PB
Ah. I see the [txtDayBlock] areas are string titles that simply want to include the formatted time values. In that case you have a good solution :-)
Nov 17 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ken | last post by:
I am using the query bellow to display some fielsd on my page and am having some problema displaying the data from calltime. I have the field setup in access as short time but when it is displayed...
3
by: chuck | last post by:
Hi, This is a test for a larger form i am working on. I want to have a real time display of the radio button value when selected. I tried with various event handlers with varying success. The...
1
by: Laurel | last post by:
Hi, Do you know some browsers that would misbehave with these three lines of CSS code: table.liste tr {display:none;} table.liste tr.headers {display: block;} table.liste tr.headers...
1
by: Scott | last post by:
I have a query that calculates the Total Time spent working on a project. As an employee can have multiple time entries for a project, the "total Times" are summed in a report using the following...
0
by: DaveF | last post by:
I am trying to do a rolling calendar. Right now I initiate the time at 12:00. How do I chech the time and I guess I want to round down to last hour. So if it is 1:55, I want to start off at 1:00 ...
3
by: Marauderz | last post by:
Hello guys, got a little question regarding the regional language settings . Anyway I got a Windows 2003 Server machine that was installed with the date format "dd/MM/yyyy" and location still...
2
by: AMDRIT | last post by:
Hello Everyone, I would like to format the Display Members of a combobox's datasource. Is there a way to apply a format without subclassing the original datasource? For example, given a list of...
2
by: Erwin Moller | last post by:
Hi group, I have this obscure problem that really needs to be fixed, but I am out of ideas. Because the original script is very big, I'll try to summarize its functionality. Setup: - many...
1
by: cdownload | last post by:
I have a form with a textbox where the user will enter in a time they start a job. They also have a second textbox to enter a stop time. I want the user to just be able to type in the military time...
2
by: prisesh26 | last post by:
hi, Iam using the plug in for calendar. when we click the text box or go through tab we will get the calendar popup. but as iam having the text box in the right end of the screen. the saturday...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.