Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3395588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:18:27+00:00 2026-05-18T04:18:27+00:00

How to display full server date and time in vb.net ? i want to

  • 0

How to display full server date and time in vb.net ?

i want to display server date as 20-Nov-2010 in textbox1 and time as 08:11:00 AM in Textbox2 on page load event

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:18:28+00:00Added an answer on May 18, 2026 at 4:18 am

    If you want to display server time:

    Markup:

    <asp:TextBox runat="server" ID="TextBox1" />
    <br />
    <asp:TextBox runat="server" ID="TextBox2" />
    

    Code-behind:

    Imports System.Globalization
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        ' pay attention to DateTime.Today '
        TextBox1.Text = DateTime.Today.ToString("dd-MMM-yyyy")
    
        ' culture-specific: '
        Dim ci As CultureInfo = new CultureInfo("en-US")
        TextBox2.Text = DateTime.Now.ToString("T", ci)
    
        ' or culture-independent: '
        TextBox2.Text = DateTime.Now.ToString("hh:mm:ss tt")
    End Sub 
    

    If you want to display client time:

    Markup:

    <!-- Adding the reference to jQuery CDN, for example, by Google -->
    <script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    
    <!-- Formatting function -->
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            var names = ["Jan", "Feb", "March", "Apr", "May", "June", "July", "Aug", "Sepr", "Oct", "Nov", "Dec"];
            var now = new Date();
            $('#TextBox1').val(now.getDate() + '-' + names[now.getMonth()] + '-' + now.getFullYear());
            var minutes = now.getMinutes();
            $('#TextBox2').val(now.getHours() + ':' + formatLeadingZero(minutes) + ':' + formatLeadingZero(now.getSeconds()) + ' ' + formatTimePeriod(minutes));
        });
    
        function formatLeadingZero(value) {
            return (value < 10) ? '0' + value : value;
        }
    
        function formatTimePeriod(value) {
            return (value < 12) ? "AM" : "PM";
        }
    </script>
    
    <!-- ASP.NET controls -->
    <asp:TextBox runat="server" ID="TextBox1" />
    <br />
    <asp:TextBox runat="server" ID="TextBox2" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to display the page loading status (i.e. waiting for
In the SQL Server Full-Text Indexing scheme i want to know if a table
I get a page full of info from the server VIA JSON. There is
I have a SQL Server table full of training course progress. I want to
I have a GWT web-app with a nearly full page Google map window. Inside
I'm trying to build a simple HTTP Server using Java, using java.net.ServerSocket = new
Hello i am using Jquery data table to display a table from the server
I have a custom error page in an Azure ASP.NET web app where I'd
I am trying to display a jpg file from a server into an imageView.
I have an application which needs to load data from a remote server (businesses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.