More Group Sites
School Rankings
Jobless Net
Better Home
Enviro++


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

sqlce get date part from getdate() Options · View
hong
Posted: Sunday, July 31, 2011 9:15:55 PM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 335
Points: 711
Location: Australia
getdate() is a built-in sql server function. It returns the current database system timestamp as a datetime value without the database time zone offset. See http://msdn.microsoft.com/en-us/library/ms188383.aspx for more details. To get date part:
Code:
select CONVERT (date, GETDATE())


However, sql server compact edition doesn’t support date. You can use the following methods to get date part of the datetime:
Quote:
select CONVERT(nvarchar(10), getdate(), 103)

Quote:

CONVERT(datetime, CONVERT(nvarchar(10), getdate(), 103), 103)


whereby 103 is for Australian date format ("DD/MM/YYYY").
Sponsor
Posted: Sunday, July 31, 2011 9:15:55 PM
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.265 seconds.