일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Visual Studio
- Tips강좌
- 김성엽
- Windows
- Desktop
- 배열
- Tips프로그래밍강좌
- CS
- Javascript
- 함수
- Direct2D
- c++
- 지식나눔강좌
- 리뷰
- 포인터
- Win32
- Programming
- 연산자
- 문법
- Kotlin
- 백준
- 프로그래밍
- c
- 알고리즘
- 이지스퍼블리싱
- tipssoft
- c#
- VS ERROR
- 티스토리
- doit코틀린프로그래밍
Archives
- Yesterday
- Today
- Total
F.R.I.D.A.Y.
지식인 : 시간 문자열을 숫자(초)로 변환하기 본문
반응형
지식인 URL : https://kin.naver.com/qna/detail.nhn?d1id=1&dirId=1040103&docId=314286756&page=1#answer1
해결 코드 :
dim str as string = "00:20:34" '숫자로 변환할 데이터입니다.
dim splitor() as string 'split 후 데이터를 넣을 배열입니다.
dim buffer() as integer = { 60, 60, 1} '각 데이터에 대한 이전 단위 대비 크기 입니다.
dim total as integer = 0
dim temp as integer
splitor = split(str, ":")
for i = 0 to splitor.count - 1
temp = cint(splitor(i))
for k = i to buffer.count - 1
temp *= buffer(k)
next
total += temp
next
728x90
반응형
'외부활동 > 지식in' 카테고리의 다른 글
지식인 : 리스트 자료구조 포인터 (0) | 2019.03.06 |
---|---|
지식인 : 성적을 xls(엑셀)로 출력하기 (0) | 2019.01.16 |
지식인 : 두번 째로 큰 수, 두번 째로 작은 수 (0) | 2018.11.12 |
지식인 : if없이 가까운 수 찾기 (0) | 2018.09.25 |
지식인 : 과일깍기, 테두리 제거 (0) | 2018.09.25 |
Comments