Showing posts with label calendar. Show all posts
Showing posts with label calendar. Show all posts

Friday, March 30, 2012

Saving the time with the date

I have a calendar control on a page that is saving the date to a SQL Server 2005 table and this works fine; but how do I also save it with the current time? It is always saving as 12:00:00 AM.

Thanks for the help.

Check your calendar control properties because it probably is setup to display/send only date. In this case SQL server add dfault time for date which is 12 AM.
It should have options like date and time, date only, time only.

Thanks

|||

It seems odd you would use a date from a calendar and want the current time but...

DateTime DateOnly = new DateTime(2007, 5, 3);
DateTime RightNow = DateTime.Now;

// add current time to date

DateOnly = DateOnly.AddHours(RightNow.Hour);
DateOnly = DateOnly.AddMinutes(RightNow.Minute);
DateOnly = DateOnly.AddSeconds(RightNow.Second);

|||

This is an intranet application where our CSRs record incoming items and the time stamp needs to be with the record. I solved it by putting System.DateTime.Now() into a Session variable.

Thanks for the responses. Now if I can figure out my "Access is Denied" problem with ajax...

Tuesday, February 21, 2012

Samples for Calendar Style Reports

newbee! question.
Want to see sample reports that display
the data in calendar format like outlook does.
Example ... all appointments for the next 2 weeks arranged
as a calendar.
Thank you for your help in advance.It depends on which Outlook view. Month? Week? Day? You probably could
get the day view or business week view working using tables as well as a
dataset that included all days and hours, and outer join your appointments
so you could display the entire range of data and leave the non-appointments
blank.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Rakesh" <Rakesh@.discussions.microsoft.com> wrote in message
news:EAEA54D3-82E2-44B4-8AB0-4FEC73A79266@.microsoft.com...
> newbee! question.
> Want to see sample reports that display
> the data in calendar format like outlook does.
> Example ... all appointments for the next 2 weeks arranged
> as a calendar.
> Thank you for your help in advance.
>