Using exotic date formats….

General Add comments
by:

Recently I ran into a customer that wanted to extend the use of Service-now.com into a non-ITIL area. Piece of cake!
During an exercise with them – just building an application from scratch!  – we ran into a required functionality which I underestimated.
It actually sounded easy – but so far I’ve not been able to get it working completely correct.
The customer wants to have the date displayed as follows:

“year” (1-digit) “weeknumber” (2-digits) . “weekday” (1-digit)”

A sample: 915.2 which represents Tuesday – April 7, 2009.
9 for 2009
15 for week 15 (April 06 until April 12)
2 for second day of week – Tuesday

Now you can quite easily change the Service-now.com date representation, and you can do this at the system level or at the user level, but this customer requirement is not that easy…..
Service-now.com supports the Java simple dateformat functions – and you can find good information on it HERE.
So I went out to the System Properties and changed the date format field to:

yyw.F

Just following what I’m reading from the Java date function page….with one remark; a year of 1-digit just doesn’t seem to be possible, so I used yy.
This doesn’t do it – and I cannot get it to display correctly (yet!)
Still working on this one with SNC support – the date picker function is not working correctly (displaying) with the system defined date format and the week is also not displaying as expected…..
I’m sure we will get there and I’m confident SNC will get us there – but could certainly use some help here from others too…..

Update: and of course we got there! With the help of SNC we managed to get this more exotic date format to work.

Leave a Reply