This project has moved and is read-only. For the latest updates, please go here.

SPUtility.GetSPField swapping day with month

Feb 16, 2016 at 4:19 PM
Hi. I have a calendar. I am checking for double-booking, by comparing the user's inputs and the existing data in the list. However, when retrieving the user's value, I am encountering the following problem:

04/02/2016 (4th February 2016 ) is being returned by SPUtility.GetSPField('xxx).GetValue() as:

Day: 2
Month: 4
Year: 2016

Any help?

Thanks & regards,

Feb 23, 2016 at 3:51 PM
You should be able to change the date format by calling SetTimeFormat before the rest of your code:


Take a look at the documentation for Date Fields here.