Missing "AM" part in time while "PM" displays correctly

kunal_janu

New member
Joined
May 13, 2009
Messages
3
Programming Experience
1-3
i use customFormat to specified the format that i need
but like hh:mm tt should display in 12:23 PM but it only display 12:23 and the "tt" missing already
did i write the format wrong already?

I have a similar problem guys..
I use now().ToShortTimeString.. The problem is that it shows PM correctly.. The AM part seems to be blank..

It's being used in a report.. Take a look at the screen shot..
2jbr4ed.jpg
 
This worked for me.

I just placed a textbox on a form and in the load event plaed the following code.

TextBox1.Text = Now().ToShortTimeString

The output is --10:36 AM

Ty
 
I just placed a textbox on a form and in the load event plaed the following code.

TextBox1.Text = Now().ToShortTimeString

The output is --10:36 AM

Ty


Thanks for the response. As you see I have been using the same thing in my code, It had been working all this while, It's vanished (only AM) all of a sudden..

All i wanted to know is if this was a temporary problem or if I was missing something..
 
I would try

Unfortunately I cannot say what the issue maybe as it simply pulls the system time.

I would first try the code to output to a different control like a label of text box. If that does not work try opening a new project and test is on a new form. That will eliminate allot of questions.

Did you say that you are writing this to a DB? It is possible that the DB is cutting off the value. Check to make sure the type for that column has not changed.

Hope this helps.

Ty
 
It's working now

Hey

I think this was more of a temporary problem.. something gone wrong at sometime.. it back working again..

But I wonder why the problem occured in the first place.. this is definitely not a regional setting problem as otherwise there should have been a mssing PM as well..

Thanks for all your help and time

Kunal
 
Back
Top