When I use: Format(datetime , "Short Time") or Format(datetime , "t") or
Format(datetime , "hh:mm") I always get an AM/PM value on the end of the time
string. How do I get a short time in military format without AM/PM? Thanks.
Bob Hughes 2 28284
ReHuges,
This is only for the cultures where the PM and AM are used. This format is
called in the US Military time.
In those cultures you can use "HH:mm" in the others both hh:mm and HH:mm
will work the same.
I hope this helps?
Cor
Try these:
Dim strTime As String = Format(DateTime .Now, "HH:mm")
MessageBox.Show (strTime, "Time Example")
Dim strTime As DateTime
MessageBox.Show (strTime.Now.To ShortTimeString , "Time Example")
I hope this helps This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: a_geek |
last post by:
Hello,
I'm writing a small program that needs to check Unix timestamps for
falling into an interval (typical usage: ./program 2005-03, you get
the idea). Now, I create two time stamps from the user's input to
create the interval's borders using mktime(). Trying to check the sanity
of my program, I also converted the values back to tuples using
localtime(). Unfortunately, I get back one of them with the DST flag
set, and the other with...
|
by: Qopit |
last post by:
Hi there,
I'm pretty new to Python and am trying to figure out how to get "will
this code compile?"-like code checking. To me this is a pretty basic
language/environment requirement, especially when working with large
projects. It is *much* better to catch errors at "compile-time" rather
than at run-time.
One thing I've "found" is the PyChecker module (conveniently embedded
in SPE), but it doesn't seem to do that great of a job. ...
|
by: rnn98 |
last post by:
hi,
my multithread application, running under solaris box, is crashing
eventually.
I tried to spot and substitute functions not "thread safe", but I
guess my search wasn't good enough. I have put localtime_r and
asctime_r where I was using localtime and asctime. But I didn't find
any correspondent _r function to "time".Also, I found that "readdir"
is not thread safe. But what about "scandir"?
Thanks for any help
|
by: Mike |
last post by:
Hi,
I use some old application that need "short path" - previous dos style.
For example , I need to convert "C:\MyLongPath\1.txt" to
"c:\mylong~1\1.txt". Does exist any classes at vb.net for doing this?
Thanks,
Michael
|
by: sharmadeep1980 |
last post by:
Hi All,
I am facing a very unique problem while compling my project in
"Release" build.
The project is building in DEBUG mode but giving linking error on
Release build.
Here is the error:
Creating library Release/fnimqcmd.lib and object
Release/fnimqcmd.exp
CoIMQCmd.obj : error LNK2001: unresolved external symbol
| |
by: rdudejr |
last post by:
Hi all,
Ive got a database approx 350 GB in which Im getting very high Time
waited for prefetch. This is directly out of the snapshot for the db
(these are for the entire database I assume as I pulled it out of get
snapshot for all on {dbname})
Total buffer pool read time (milliseconds) = 45660639
Total buffer pool write time (milliseconds)= 42128058
Total elapsed asynchronous read time = 33856320
|
by: Curious |
last post by:
Hi,
I have two columns defined as DateTime type in the Visual Designer,
i.e., Dataset.xsd.
In the grid to which the columns are bound, they're both displayed as
date, for instance, 5/23/2007. It seems that they're using the default
"short date" format.
I want to use the "long date" format to display the actual hour/minute/
|
by: tarlino |
last post by:
Hi! I'm play with the sound generation (c++ and directX).
Now I would like to manage same filter on my sample. But now I must to
convert my audio buffer "BYTE" (from DirectX) to an arry of "short" and
viceversa.
I found this source:
**************************************************************
double dPowI = ceil( log10( (double)iLen / ( ((double)wBitsPerSample / 8 )
+ wChannels - 1 ) ) / log10( 2.0 ) );
int iNearTwoPower = (int)pow(...
|
by: =?Utf-8?B?d2lsZG9y?= |
last post by:
when I highlight the "short file" (result of internet download) ,and click
delete, the response is "could not find this file", "verify the location and
try again"
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |