Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Alex McGhee
2,377 PointsHow to assign date and time stamps to an array?
When a new value is added in my app, I'd like to assign a date stamp that won't change. How do I do that? If I use the .timeIntervalSince1970 function, as soon as something changed in the code the function changes the time and date value to the current value (even in a let constant) . How do I assign the date from the time function to an array so that it won't keep changing.
I'm only using a playground, would it be different in an app?