comparison LazyBear/Global functions/ConvertStringToDate.swift @ 411:681fb377235e

Implementing insider transactions
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Mon, 07 Jun 2021 20:59:52 +0200
parents
children 5f21f7c23c5e
comparison
equal deleted inserted replaced
410:e24c9ca71824 411:681fb377235e
1 //
2 // ConvertStringToDate.swift
3 // LazyBear
4 //
5 // Created by Dennis Concepción Martín on 7/6/21.
6 //
7
8 import SwiftUI
9
10 func convertStringToDate(_ stringDate: String) -> Date {
11 // Convert string to date
12 let dateFormatter = DateFormatter()
13 dateFormatter.dateFormat = "yyyy-MM-dd"
14
15 let date = dateFormatter.date(from: stringDate)!
16
17 return date
18 }