Converting report dates between UTC and Local Time in Crystal 10 or earlier

    Question

    How do I convert date time fields between UTC and Local Time in Crystal?

    Answer

    There is a  free component you can download from the website below.  The installer is for Crystal 9 so instead copy

    the .dll file manually to \windows\system32 and restarted Crystal.

     

    http://www.viksoe.dk/code/u2lwin32.htm

     

    You can then see the new functions under the Additional Functions item in the Function Tree, in the module named Win32. I used the one below and it seems to have done the trick:

     

    UtcToDateTime (Adjusts a DateTime value in UTC to local time.)

    Environment

    Crystal 10 or earlier.  This does not work on 2008 servers or any 64bit machines.  You could instead write your own conversion formula http://community.landesk.com/support/docs/DOC-3856

     

    For Crystal 11 please see the following article:

    http://community.landesk.com/support/docs/DOC-11762