Contacto +52(442)298-0967 msn@swideascom

Using format-date in XPATH 2.0

Using format-date in XPATH 2.0

One of those things that should be really easy, until reveals the true ugly face, and don’t get me wrong, I’m highly convinced of XPATH being an well supported and usefull language, but maybe some things -like, formating a date just for say- could been simpler.

As usual, everything looks going well… until some date-time non standard formats came to scene and it should be displayed way different than our data service returns them, for this cases the date-format command it’s all what you need, unless your using XPATH, in that case, it’s just the tip of the solution.

This is how my web service bring my nodes:

The goal in my case is display the CT_CreatedDate in a format like this: DD/MM/YYYY a las HH:II, here is how I solve that:

And our output would be like:

 

Thank’s for reading and as usual I leave you withour traditional end-of-post pic

MemeSupportAllScenarios

CEO SWFideas pro·gram·mer (n) An organism capable of converting caffeine into code. *RichMedia Developer | *Homodevelopus

0 Comments

Leave a reply