Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Informix and DBDATE on NT

2 views
Skip to first unread message

Erik Joghems

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
Hello,

I'm trying to use the European date format from livewire (NES 3.6)
using an Informix database, both database and web server are on NT.

If I understand correctly I should be able do this by setting the
environment variable DBDATE=DMY4.

This works fine from the Informix command line utility dbaccess.
But I can't get it to work from livewire (using dbadmin).

It seems as if DBDATE isn't taken into account.
I've tried defining DBDATE in various places :
- the NT system env. variables.
- setnet32.
- the webserver start bat file.
- file setenv.cmd in the Informix server.

If anyone knows the proper incantation please let me know,

Thanks,
Erik Joghems.

Denis Grisvard

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
hi,
we solved this problem by using this function
we call this function with every date returned by the database server
eg:
select = "select date from table"
var curseur = Conn.cursor(select)
var i=0
var ligne
var wtableau = new Array()
while (curseur.next()) {
ligne = new Array()
ligne[0] = convertDate(curseur.Datetable)
wtableau[i] = ligne
i++
}


function convertDate(dateEnglish)
{
var jj,mm,aa

var wdateEnglish = dateEnglish
if (wdateEnglish == null)
return null
jj = wdateEnglish.getDate()
if (parseInt(jj,10)<10)
jj="0"+jj

mm = parseInt(wdateEnglish.getMonth(),10)+1
if (parseInt(mm,10)<10)
mm="0"+mm

aa = wdateEnglish.getYear()
if (parseInt(aa,10) < 100)
aa= "19"+aa

return jj+"/"+mm+"/"+aa
}

hope this will solve your problem !
Denis


Erik Joghems a écrit :

0 new messages