insert every time value 15 minutes in array

Hi,

Please kindly assist how can we insert every 15 minutes into an array?

Thanks.

output:
Arr_TimeValuesPer15=00:00 AM,00:15 AM,00:30 AM,00:45 AM,01:00 AM,01:15 AM,01:30 AM,......11:45 PM


Dim Arr_TimeValuesPer15() as string
redim preserve Arr_TimeValuesPer15(ubound(Arr_TimeValuesPer15)+95)

for i=0 to ubound(Arr_TimeValuesPer15)
Arr_TimeValuesPer15=format(time(),"hh:mm:pm")+15minutes
next i


RyanBankAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
Dim Arr_TimeValuesPer15() as string
dim d as date
redim preserve Arr_TimeValuesPer15(ubound(Arr_TimeValuesPer15)+95)

d = 0
for i=0 to ubound(Arr_TimeValuesPer15)
  d= dateadd("n", 15)
  Arr_TimeValuesPer15=format(d,"hh:mm:pm")
next i

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RyanBankAuthor Commented:
Thanks worked like a charm!

Dim Arr_TimeValuesPer15() As String
Dim d As Date
ReDim Preserve Arr_TimeValuesPer15(95)

d = 0
For i = 0 To UBound(Arr_TimeValuesPer15)
 
  Arr_TimeValuesPer15(i) = Format(d, "hh:mmAM/PM")
  d = DateAdd("n", 15, d)
Next i

Debug.Print Join(Arr_TimeValuesPer15, ",")

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.