I think you can convert year.text!+month.text!+day.text!
to this:
"\(year.text!)-\(month.text!)-\(day.text!)"
More Related Contents:
- Converting Yearly Salary to Weekly in Swift
- Rounding a double value to x number of decimal places in swift
- Any way to replace characters on Swift String?
- Why Choose Struct Over Class?
- Is key-value observation (KVO) available in Swift?
- Share data between main App and Widget in SwiftUI for iOS 14
- Differences in NSDateComponents syntax?
- Animate drawing of a circle
- When are argument labels required in Swift?
- How do I compare two dictionaries in Swift?
- NSUserDefaults not working on Xcode beta with Watch OS2
- Cancel a timed event in Swift?
- How do I check if a firebase database value exists?
- Calculate age from birth date using NSDateComponents in Swift
- Keep window always on top?
- Saving CGImageRef to a png file?
- Swift: Converting a string into a variable name
- Selecting global or object print function
- How do I get a reference to the AppDelegate in Swift?
- Use Binding with a TextField SwiftUI
- NSAttributedString, change the font overall BUT keep all other attributes?
- Swift Array – Check if an index exists
- Swipe-able Table View Cell in iOS 9
- How to silence a warning in Swift?
- Swift 2.0 : ‘enumerate’ is unavailable: call the ‘enumerate()’ method on the sequence
- PreviewProvider and ObservedObject properties
- Get the top ViewController in iOS Swift
- Multi-Component Picker (UIPickerView) in SwiftUI
- How to compare one value against multiple values in Swift?
- How to configure ContextMenu buttons for delete and disabled in SwiftUI?