Dan
Dan

Reputation: 11

Calling the system time in on the Windows 10 IOT on Raspberry PI3

My project takes pictures and I'm looking to set the image file names as the time and date they were taken.

I've programmed the camera and set up the real time clock and they both work. However, I'm now struggling to link the two.

Is there a method of returning the system time as as string? Or anything else I may not have considered?

I used this guide for the RTC : https://www.codeproject.com/Articles/1113626/Adding-the-Missing-Real-Time-Clock-to-Windows-IoT

Upvotes: 0

Views: 274

Answers (1)

Rita Han
Rita Han

Reputation: 9700

If you get RTC work like this guide state:

getting Windows IoT to initialize its clock from RTC at bootup so that other solutions don't need to be modified to read from the RTC directly.

You can use the following code line to get system time as a string:

DateTime.Now.ToString()

Upvotes: 1

Related Questions