V
V
Viktor Budko2015-01-23 17:51:26
Visual Basic
Viktor Budko, 2015-01-23 17:51:26

How to break dates into numbers and words into letters?

You need to export from the database to the form
To do this, you need to split the date of the format 12/21/2014
Split divides only by separators, at the output 21 12 2014
Join gives 21122014 how to split before getting each value?

numb(0) = 2
numb (3) = 2
numb(7) = 4

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Budko, 2015-01-23
@BudVic

I'm answering my own question, maybe it will help someone.

Private Sub Кнопка()
Dim sStr
Dim Dat
Dim Datall
sStr = Split(Me!ДатаРождения, ".")
Dat = Array(sStr(0), sStr(1), sStr(2))
Datall = Join(Dat, "")
Dim i As Long
Dim numb() As String
ReDim numb(Len(Datall) - 1)
For i = 0 To Len(Datall) - 1
numb(i) = Mid$(Datall, i + 1, 1)
MsgBox numb(i)
Next i
End Sub

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question