Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Change date with cast?

Author  Topic 

sapator
Constraint Violating Yak Guru

462 Posts

Posted - 2007-10-15 : 04:26:11
Hi.
I'm trying to change the date or p.e. 5/5/2006 to 05/05/2006

is use CAST(d.expiry as datetime(12) as expiryX

it does not work.
Any ideas (note, i cannot use the convert function at all)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-15 : 04:29:01
Try to buddy-function, CONVERT, instead if you are using Microsoft SQL Server 2000.
Why can't you use CONVERT?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

sapator
Constraint Violating Yak Guru

462 Posts

Posted - 2007-10-15 : 04:47:38
The program i'm using is a subprogram of sql developmnet and it does not include convert as a command.
Go to Top of Page

sapator
Constraint Violating Yak Guru

462 Posts

Posted - 2007-10-15 : 05:00:28
Ok, actually there was a stuck of memory or something and the program was always crushing, i reseted and used convert.
Thanks.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-15 : 05:14:46
If it always was this easy!
Only reset/reboot, and you get new functionality



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

sapator
Constraint Violating Yak Guru

462 Posts

Posted - 2007-10-15 : 05:34:37
Yes, well
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-15 : 07:32:07
quote:
Originally posted by sapator

The program i'm using is a subprogram of sql developmnet and it does not include convert as a command.



What is that subprogram?
Also, if you want to show formatted dates at front end, then use format function there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -