← Back to team overview

dhis2-devs team mailing list archive

Re: Using NVD3: Converting DHIS2 dates to Unix Time Stamp format

 

Try with

new Date("2012-06-27 00:00:00").getTime()

On Tue Jan 13 2015 at 4:53:12 PM Greg Rowles <greg.rowles@xxxxxxxxx> wrote:

> Hi Devs
>
> I'm trying to set up a line chart using NVD3 (similar to example
> http://nvd3.org/examples/cumulativeLine.html) which requires JSON date
> values in the Unix Time Stamp format. Has anyone solved this date format
> issue before? Source data coming from DHIS2 is returned as 2012-06-27 00:
> 00:00 while the expected Unix Time Stamp format value is 1340755200000.
>
> Greg
>
> --
>
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :    073 246 2992
> Landline:   021 554 3130
> Fax:          086 733 8432
> Skype:      gregory_rowles
>
>  _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References