Watch, Follow, &
Connect with Us

Please visit our new home

Welcome, Guest
Guest Settings

Thread: date format for strftime with %c (format for current locale)

Permlink Replies: 0
John Baird

Posts: 22
Registered: 6/15/09
date format for strftime with %c (format for current locale)
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 24, 2017 2:01 AM
I've been experimenting with strftime using %c to format the date/time for the current locale. Oddly, it is formatting the date as 05/24/17 (mm/dd/yy) instead of 24/05/17 (dd/mm/yy). Windows function GetDateFormatEx correctly produces 24/5/2017 using either LOCALE_NAME_SYSTEM_DEFAULT or LOCALE_NAME_USER_DEFAULT as the first parameter. Checking "Control panel" -> "Region and Language", shows the format as "English (New Zealand)" and the example short date is given as 24/05/2017.

What am I missing here?

TIA, John
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02