xenres
xenres

Reputation: 59

Converting oracle datetime to javascript date

How to convert oracle datetime to javascript datetime format with in the query ?

I tried to look at the oracle documentation but I was not able to find what I was looking for ?

I am trying to pull data for a time series chart similar to below fiddle but pulling the data from oralce database in json format.

http://www.highcharts.com/demo/spline-irregular-time

In the above demo, date is created using Date.UTC(1970, 9, 27)

I am getting the data using json.

    $.getJSON('data.json', function(data) {
    options.series[0].data = data;
    var chart = new Highcharts.Chart(options);
});

I can't seem to find a way to get UTC format(milliseconds from 01 January, 1970 00:00:00 Universal Time (UTC)) from oracle database.

Upvotes: 0

Views: 2950

Answers (2)

xenres
xenres

Reputation: 59

As far as I searched, there is no way to get the date as UTC time stamp from oracle db. We have to do it using what ever programming language that we are using, after getting the date from the database.

Upvotes: 0

Galbarad
Galbarad

Reputation: 453

Use Oracle function to_char and get date format that you need

Upvotes: 0

Related Questions