that would go into a string typically by default, it may be possible to select the date field as epoch time depending on the databse type which is a long int that you could feed to time formatting options of your own.
 

On Tue, Jun 15, 2010 at 4:37 PM, David Swardstrom <dswardstrom@remotelink.com> wrote:
I am working with Javascript and Freeswitch to emulate some Conferencing
capability that the company I am working for has in production using
other products.

One thing that I need to do is to access a timestamp from a database in JS.
In pgAdmin for Postgres this is a "timestamp without time zone".

In JS there is a data type called Date.

Question: If I read a row of the database which includes this timestamp
field, what should I put it into?
* Can I put it directly into a Date data type?
* Does it have to come out as a string or a number?
* If it is a number can I then put it into a Date?
* If it is a string, what is the format:
 Is it: "YYYY-MM-DD HH:MM:SS.ffffff"?

I looked in mod_spidermonkey_odbc.c pdbc_next_row() and it appears to
call SQLFetch() and return the result.
But information on a row contains both a value but it's type,
so what will the interpreter do?

If anyone knows, let me know, otherwise I will incorporate a way
to test this into my code and let everyone know (may also add this
to some Wiki).

Regards,
David Swardstrom
(profile)http://wiki.freeswitch.org/wiki/User:Dswardstrom

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900