470,641 Members | 1,578 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

cast from datetime type to smalldatetime type?

Hi,
How can I cast from datetime type to smalldatetime type.
I get the records from a table which has got a datetime type column but I
want to display it smalldatetime format.
Thanks,
Salim
Nov 17 '05 #1
2 5841
Stu
I think you can use something like:

response.write(dMyLongDate.tostring("dd/MM/yy"))

Regards,

Stu
"Salim Afar" <sa****@luckyeye.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
How can I cast from datetime type to smalldatetime type.
I get the records from a table which has got a datetime type column but I
want to display it smalldatetime format.
Thanks,
Salim

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003
Nov 17 '05 #2
Not like that:
I get it with sql string.I want to do something like that :

select format(mydate,("dd/MM/yy"),.... from myTable

Thanks a lot

"Stu" <st****@ntpcl.uk.com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
I think you can use something like:

response.write(dMyLongDate.tostring("dd/MM/yy"))

Regards,

Stu
"Salim Afar" <sa****@luckyeye.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
How can I cast from datetime type to smalldatetime type.
I get the records from a table which has got a datetime type column but I want to display it smalldatetime format.
Thanks,
Salim

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by JTWhaler | last post: by
4 posts views Thread by =?Utf-8?B?QmFidU1hbg==?= | last post: by
7 posts views Thread by TheLostLeaf | last post: by
2 posts views Thread by justin | last post: by
2 posts views Thread by Thomas609 | last post: by
11 posts views Thread by =?Utf-8?B?UGFvbG8=?= | last post: by
3 posts views Thread by =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post: by
1 post views Thread by Korara | last post: by
???
1 post views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.