views:

27

answers:

1

Hello,

We have a string in AD which is actually storing a date in the YYYYMMDD format, which when you map it in sharepoint to a profile property, just looks plain ugly, e.g. 20091130. Our AD people are refusing to change the format of it in AD, so we were wondering if there was a way (javascript perhaps?) of changing it so that it at least add's in some hyphens, e.g 2009-11-30.

Anyone? :-)

+1  A: 
var udate = "20091130";
var format_date = udate.substr(0,4)+'-'+udate.substr(4,2)+'-'+udate.substr(6,2);

The only solution I can think of.

dblackshell