------------------------------------------------------------------------------ select getutcdate(), getdate(), CONVERT(VARCHAR(30),GETDATE(),112) 以台灣為例 getutcdate() = (getdate() - 8小時) ----------------------- ----------------------- ------------------------------ 2009-06-01 16:07:06.083 2009-06-02 00:07:06.083 20090602 ------------------------------------------------------------------------------ CREATE TABLE [dbo].[ASPStateTempSessions]( [SessionId] [nvarchar](88) NOT NULL, [Created] [datetime] NOT NULL DEFAULT (getutcdate()), [Expires] [datetime] NOT NULL, [LockDate] [datetime] NOT NULL, [LockDateLocal] [datetime] NOT NULL, [LockCookie] [int] NOT NULL, [Timeout] [int] NOT NULL, [Locked] [bit] NOT NULL, [SessionItemShort] [varbinary](7000) NULL, [SessionItemLong] [image] NULL, [Flags] [int] NOT NULL DEFAULT ((0)), PRIMARY KEY CLUSTERED ( [SessionId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]