Re: converting QuantLib date back to mm/dd/yyyy

Posted by Oleg Goldshmidt on
URL: http://quantlib.414.s1.nabble.com/converting-QuantLib-date-back-to-mm-dd-yyyy-tp13961p13980.html

On Tue, Jan 29, 2013 at 6:08 PM, Pavan Shah <[hidden email]> wrote:

> How can I convert a QuantLib date into mm/dd/yyyy and ensure that it is
> output in one cell?

If you have Date d you can do

        char s[11] = {0};
        snprintf(s,11,"%02d/%02d/%04d",d.month(),d.dayOfMonth(),d.year());

- then output s. It's not a QuantLib-specific question - it looks like
basic C/C++ ?

--
Oleg Goldshmidt | [hidden email]

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users