Usually, when a custom display form for a SharePoint list is created having date time fields,
the form shows the date format as,
The format as shown above has a drawback that ,
1. Date field shows time value too.
2. Date field shows an hour less due to which there will occur a day less in the date field.
Solution:-
To avoid the above situation,
Modify the custom display form's xsl as -
Important Note :-
1. Use "string" function to avoid XPath error.
2. 1033 is a locale code.
3. 1 is the date format, the possible values can be 1,4,5,7,12,13,15. Each represents a date format for e.g. y/m/d OR y-m-d etc.
the form shows the date format as,
The format as shown above has a drawback that ,
1. Date field shows time value too.
2. Date field shows an hour less due to which there will occur a day less in the date field.
Solution:-
To avoid the above situation,
Modify the custom display form's xsl as -
Important Note :-
1. Use "string" function to avoid XPath error.
2. 1033 is a locale code.
3. 1 is the date format, the possible values can be 1,4,5,7,12,13,15. Each represents a date format for e.g. y/m/d OR y-m-d etc.
No comments:
Post a Comment