Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Date Types

5 posts in General Discussion Last posting was on 2002-07-30 14:14:31.0Z
Chris_B Posted on 2002-07-29 12:50:46.0Z
From: Chris_B
Date: Mon, 29 Jul 2002 08:50:46 -0400
Newsgroups: ianywhere.public.general
Subject: Date Types
Message-ID: <85CFA8A0770690E30046912585256C05.0046913585256C05@webforums>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:723
Article PK: 2701

I am having trouble configuring my SQL Studio Anywhere database date types.
I only want the date (yyyy-mm-dd) to be written to the field -
unfortunately an empty time (00:00:00:0) is also written to the field and I
dont want this to happen.

I have tried configuring my database and setting the "Truncate_date_values"
setting in the configuration to "On" to eliminate this problem but this has
not worked.

Is this the correct action to take? When must this setting be changed
(before the tables are created or can it be done after the tables are
created) ?

Any advice would be appreciated

Chris

chris@habit.co.za
c.k.b@webmail.co.za


Robert Waywell Posted on 2002-07-29 16:37:47.0Z
From: "Robert Waywell" <rwaywell@ianywhere.com>
References: <85CFA8A0770690E30046912585256C05.0046913585256C05@webforums>
Subject: Re: Date Types
Date: Mon, 29 Jul 2002 12:37:47 -0400
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <kXyi3$xNCHA.963@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.143.74
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:721
Article PK: 2700

What version and build number?
How have you declared the Date column?

If it is declared as DATE in (at least) version 8, then it should only
store the Date value, not the time value.

You may also want to move this question over to the
sybase.public.sqlanywhere.general forum as it has a larger audience focused
on ASA.

--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

<Chris_B> wrote in message
news:85CFA8A0770690E30046912585256C05.0046913585256C05@webforums...
> I am having trouble configuring my SQL Studio Anywhere database date
types.
> I only want the date (yyyy-mm-dd) to be written to the field -
> unfortunately an empty time (00:00:00:0) is also written to the field and
I
> dont want this to happen.
>
> I have tried configuring my database and setting the
"Truncate_date_values"
> setting in the configuration to "On" to eliminate this problem but this
has
> not worked.
>
> Is this the correct action to take? When must this setting be changed
> (before the tables are created or can it be done after the tables are
> created) ?
>
> Any advice would be appreciated
>
> Chris
>
> chris@habit.co.za
> c.k.b@webmail.co.za
>


Chris_B Posted on 2002-07-30 09:27:56.0Z
From: Chris_B
Date: Tue, 30 Jul 2002 05:27:56 -0400
Newsgroups: ianywhere.public.general
Subject: Re: Date Types
Message-ID: <61031AB14B1D81270033FECF85256C06.005F9CB885256C05@webforums>
References: <85CFA8A0770690E30046912585256C05.0046913585256C05@webforums> <kXyi3$xNCHA.963@forums.sybase.com>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:720
Article PK: 3238

Thanks for your response.

I have an evaluation copy of

Sybase Central Java Edition 4.0.1.745

using a PLUG IN : Adaptive Server Anywhere 7.0.3.2046.

I have declared my columns as DATE types, and changed the database settings
to have the date order that I want and also the setting to
TRUNCATE_DATE_VALUES to ON (but these settings have no effect).

Must I set up my different user accounts? I have set up another account and
given administrative rights to it and configured custom settings for it -
but still none of these custom settings are carried through on input or
output from the database.


Robert Waywell Posted on 2002-07-30 13:32:48.0Z
From: "Robert Waywell" <rwaywell@ianywhere.com>
References: <85CFA8A0770690E30046912585256C05.0046913585256C05@webforums> <kXyi3$xNCHA.963@forums.sybase.com> <61031AB14B1D81270033FECF85256C06.005F9CB885256C05@webforums>
Subject: Re: Date Types
Date: Tue, 30 Jul 2002 09:32:48 -0400
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <mqEIL98NCHA.582@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.143.74
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:719
Article PK: 2698

What happens when you run this script?

create table my_dates
( row_id int default autoincrement primary key,
row_date date
);

insert into my_dates(row_date) values('july 30, 2002');
insert into my_dates(row_date) values(now());
commit;

select * from my_dates


In 7.x you should be seeing the date followed by 00:00:00 for the time.
In 8.x, you will just get the date portion returned.

--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

<Chris_B> wrote in message
news:61031AB14B1D81270033FECF85256C06.005F9CB885256C05@webforums...
> Thanks for your response.
>
> I have an evaluation copy of
>
> Sybase Central Java Edition 4.0.1.745
>
> using a PLUG IN : Adaptive Server Anywhere 7.0.3.2046.
>
> I have declared my columns as DATE types, and changed the database
settings
> to have the date order that I want and also the setting to
> TRUNCATE_DATE_VALUES to ON (but these settings have no effect).
>
> Must I set up my different user accounts? I have set up another account
and
> given administrative rights to it and configured custom settings for it -
> but still none of these custom settings are carried through on input or
> output from the database.
>


Chris_B Posted on 2002-07-30 14:14:31.0Z
From: Chris_B
Date: Tue, 30 Jul 2002 10:14:31 -0400
Newsgroups: ianywhere.public.general
Subject: Re: Date Types
Message-ID: <C6F67A2D7A032ACF004E3C0385256C06.004DF12F85256C06@webforums>
References: <85CFA8A0770690E30046912585256C05.0046913585256C05@webforums> <kXyi3$xNCHA.963@forums.sybase.com> <61031AB14B1D81270033FECF85256C06.005F9CB885256C05@webforums> <mqEIL98NCHA.582@forums.sybase.com>
Lines: 3
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:718
Article PK: 2696

I do get a result showing the date followed by '00:00:00.0'.

Thanks for your help - I guess I need a later version.