Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #111137

Re: VBA time conversion

From "Peter T" <askmy@email.com>
Newsgroups microsoft.public.excel.programming
Subject Re: VBA time conversion
Date 2019-09-25 16:31 +0100
Organization A noiseless patient Spider
Message-ID <qmg18d$kd3$1@dont-email.me> (permalink)
References <80d5be5a-c945-48e8-8dd7-e08aa6a2cfe5@googlegroups.com>

Show all headers | View raw


"RG III" <mob.rrr.3@gmail.com> wrote in message
> Suppose I have the following string variable:
>
> s = "10:20 PM"
>
> Is there a function that will convert s to military like so?:
>
> s = "2200"  ' Now represents military time
>
> -Robert

There's no builtin function but easy enough to roll your own. But why not 
simply number-format the cell(s) with "hhmm"

Peter T 

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-25 02:44 -0700
  Re: VBA time conversion "Peter T" <askmy@email.com> - 2019-09-25 16:31 +0100
    Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-25 11:06 -0700
      Re: VBA time conversion Claus Busch <claus_busch@t-online.de> - 2019-09-25 20:20 +0200
        Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-25 11:37 -0700
          Re: VBA time conversion Claus Busch <claus_busch@t-online.de> - 2019-09-25 20:49 +0200
            Re: VBA time conversion Claus Busch <claus_busch@t-online.de> - 2019-09-25 20:53 +0200
              Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-25 12:02 -0700
                Re: VBA time conversion Claus Busch <claus_busch@t-online.de> - 2019-09-25 21:21 +0200
                Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-25 13:15 -0700
                Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-26 00:37 -0700
                Re: VBA time conversion Claus Busch <claus_busch@t-online.de> - 2019-09-26 10:10 +0200
                Re: VBA time conversion RG III <mob.rrr.3@gmail.com> - 2019-09-26 01:42 -0700

csiph-web