.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

display local time

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

how can I display the local time of Bahrain on my website regradless where the website is hosted and from where user is browsing it?

View Complete Post

More Related Resource Links

can anyone tell me why setInterval is not working properly i want to display the time every seconds,

setInterval is suppose to execute the script every second there getting the most uptodate time of day , but it does not update it stays the same
      <script type="text/JavaScript">

          function interval() {
              setInterval("time()", 1000);
          function time() 
              var d = new Date();
              var time = d.getHours();
              var time2 = d.getMinutes();
              var time3 = d.getSeconds();

              document.write(" : ");
              document.write(" : ");
  // -->
      <input type="button" OnClick="interval()" value="Click Me!"/>


Increase tooltip display time?

hello all,I know this question was asked 3 years ago. Is it still a NO with SSRS 2008? Does anybody know if I can code in XML to change the tooltip timing? thanks a lot!!!

how to find local time and date usin gmt time and ofset value

Hi All, i have to calculate local time and date in our data base i have gmt time range from 00:00 to 23:59 and offset is in same range but with + an - sign when + then we have to substract and when - then we have add and adjest the date with the given time for eg  gmt id 23:30 and ofset is +2:30 and date is '28-08-2010' then my local time is 23:30 -2:30  =21:00 and date will not change i want a cricteria like when offset get added then value should not be like 22:60 insted of this it is 23:00 and if it is exiding 24 then date should be increase and if time is - after gmt+ofset then date should be redused   Please give me a idea so i can solve it.  

Display current time (live?) on report?

Is it possible on a report to display a clock showing the current time, ticking? Or, is it possible to display a static picture of an analog clock? I have the current time with an expression, but would love to have it updating real time. Any luck with javascript or anything?

Date Time for Display

Hi AllI want to display time on Y axis and days on  x axis.I want to dispaly 12:00 AM,11:00 AM...11:59 PM.  on Y axis.I want function to create sequence like thatand on X axis display week like 6-sep,7-sep,..11-sep.can you give me the function for this.how i can create these

Display Real Time data in Graph


I want to display real time data in graph , the data is coming from database every 5 sec.

Please Can anyone help me?

display only the date (not time) from a sqlserver date field in dynamic data


I have some Date fields defined in my sqlserver database but these display with a time part as well (00:00:00).

how do i esnure that only the date part is displayed and not this redundant time?


want to display 24 hours time and date with datatype Datetime (Not String) in SSRS


Hi All,

I want to display 24 hours time and date in SSRS & for that I am using Format(now,"MM/dd/yyyy HH:mm:ss") but I am using this expression in Parameter, where I need to define datatype of that parameter as DateTime, not string. For Expression Format(now,"MM/dd/yyyy HH:mm:ss"), If I use DateTime datatype, It is showing error but working with String datatype.

For example:

I have parameter To Date  and value of this parameter should be 10/11/2010 13:09:16 (To Date: 10/11/2010 23:09:16) , not in AP or PM format and datatype of this parameter, want to keep DateTime that I can select value from Calender.

Please suggest me how I can achieve this?. I don't want to do it in stored Procedure side, want to do it in report side.

Thanks Shiven:)

Display custom property in propertywindow during design time


Hi there,

I derive a control from an existing one (a treeview) and properties to it. I want these properties to be easily editable during design-time in the properties window of the control.

When I add a public property representing a simple datatype (boolean, integer, ...) the property value can be edited in the property window. But when the datatype is a morge complex object, the property is disabled in the property window and can't be edited.

Below is a sample property which should be used to allow the user of the property to choose a color. What needs to be added to the code to make it work?

  Private _SelectedNodeColor As System.Drawing.Brush
  ''' <summary>
  ''' Gets or sets the SelectedNodeColor.
  ''' </summary>
  ''' <value>SelectedNodeColor</value>
  ''' <returns>SelectedNodeColor</returns>
  ''' <remarks></remarks>
  Public Property

SSRS2005- Is there way to display the rdl last modified time on Report?


Hello, All, 


Is there way to display the rdl last modified time on Report in SSRS 2005?




InfoPath 2007 display date for multiple time zones



We have an InfoPath 2007 form integrated with SharePoint 2007 and uses Web Service as Data Sources. The end users are located in multiple time zones in US and Australia. The server is located in US Eastern time zone. We would like the form to display user's local date and time.

The return of web service shows correct local date and time, except the time zone keeps at -04:00. For example during the one hour after midnight Eastern Time, the web services return:

Eastern: 2011-04-13T00:04:03.793537-04:00

Central: 2011-04-12T23:04:15.5734594-04:00

Mountain: 2011-04-12T22:04:24.3693642-04:00

Eastern Australia: 2011-04-13T15:04:18.8366836-04:00

When I preview the form it shows correct date, but after uploading it to SharePoint and view in web browser, the date is off by one day (either ahead or behind).

My looked at this post http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment/thread/677c03e4-8d71-43b3-aff9-1b6662a2528a but I don't get how it display different dates in different timezones by using UTC.

How can I make sure the form ignores the server time or the time zone indicated in the web service return, and just display the date as it is?



Local IIS doesn't serve up or (IE doesn't display) any XML based documents.


I can not display any XML based documents hosted on my local IIS. It refuses to serve even the simples for xml documents. I cannot, for example, run 'svcutil.exe http://localhost/my.wsdl' but I can 'svcutil.exe C:\Intetpub\wwwroot\my.wsdl'. None of my websites display properly. I may add that I'm running IIS 7 on Win2008R2, 64bit hosted in VM.

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

GridView inline Master/Detail record display

This code drop is part of a smash and grab series. If you're in a rush, you can just grab this code and insert it into your application, no understanding is required. When you have some time (ya, right) you may want to review the source code.

Display data in gridview dynamicallay

I have AD domain which has 100000 users, I want to display all the users in gridview controls.Actually it is displaying users in gridview after parsing entire domain which takes around 30 min. I want to display the users while loading itself.It is continously getting user information from AD domain and getting each user details, I want to display the users information which already queried instead of waiting till getting all users information

asp.net display data in gridview

i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend