This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200: Date & Time String Format

Part Number: CC3200

I have worked on get_time example from SDK of cc3200 and successfully receiving time from NTP server in below format.

Fri Jan 20 11:32:7 2018

Now i want to convert this format as 

"YYYY-MM-DD_HH:MM:SS" or   "2018-01-20_11:32:07"

is their any API or functions to convert  it to string or above mentioned format. 

any help will be highly appreciated. 

Regards,

Ashish Mone

  • Hi Ashish,

    There is no API function that I am aware of to convert to the desired format. However, I don't think it would be too difficult to alter the get_time code to meet your desired format.

    Manipulating the GetSNTPTime(unsigned char ucGmtDiffHr, unsigned char ucGmtDiffMins) function within main.c should give you what you need. It looks like the data sort of starts in the "YYYY-MM-DD_HH:MM:SS" format you desire.

    Hope this helps,
    Kevin