カレンダーエクステンダーから日時を保存し、データベースに保存しています。日時の形式はFormat="dddd, MMMM dd, yyyy"
. 次に、この日時をグリッド ビューの他のフィールドと共に表示し、このフィールドに「CalendarDate」という名前を付けます。現在、グリッドの CalendarDate は のように表示されてい"6/29/2012 10:42:35 AM"
ます。
カレンダーの日付に、「2012 年 6 月 29 日 10:42 AM」のような日付が表示されるようにします。秒だけが削除されます。これを行う方法を教えてください。
現在使用しているストアド プロシージャは次のようなものです。
Create procedure St_Proc_GetUserReportforCurrentDayTask
@userID int
as
Begin
set NoCount on;
DECLARE @TODAY DATE
SET @TODAY = CONVERT(VARCHAR(10), GETDATE(), 111)
select Production.CalendarDate as Date,
RegionAndProjectInfo.RegionProjectName as Region ,
County.CountyName as County,
WorkType.WorkTypeName as WorkType,
Task.TaskName as Task,
Production.VolumeProcessed as 'Volumes Processed',
Production.TimeSpent as 'Duration (HH:MM)'
from Production
inner join RegionAndProjectInfo
on
RegionAndProjectInfo.RegionProjectID=Production.RegionProjectID
inner join County
on
County.CountyID=Production.CountyID
inner join WorkType
on
WorkType.WorkTypeID=Production.WorkTypeID
inner join Task
on
Task.TaskID=Production.TaskID
where Production.UserID=@userID and CalendarDate >= @TODAY
End