473,320 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Print Current Time and Date

Hi!

I would like some help. I want to print the current date and time in a form . Can anyone help?
I am using VB2005

thnks
Apr 3 '07 #1
7 2924
vijaydiwakar
579 512MB
Hi!

I would like some help. I want to print the current date and time in a form . Can anyone help?
I am using VB2005

thnks
use format along with datetime function
Apr 3 '07 #2
use format along with datetime function
can you write some code because i am a beginner in VB?
thanks
Apr 3 '07 #3
vijaydiwakar
579 512MB
can you write some code because i am a beginner in VB?
thanks
try this code
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Me.Text = Date.Today.Date
  3.     End Sub
  4.  
Apr 3 '07 #4
try this code
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Me.Text = Date.Today.Date
  3.     End Sub
  4.  
this is fine thanks.
if want to print the time also?
Apr 3 '07 #5
vijaydiwakar
579 512MB
this is fine thanks.
if want to print the time also?
Me.Text = DateTime.Now
Apr 3 '07 #6
ansumansahu
149 100+
this is fine thanks.
if want to print the time also?

DateTime.Now

thanks
ansuman
Apr 3 '07 #7
thanks a lot.case close
Apr 3 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Ken Varn | last post by:
I want to be able to determine my current line, file, and function in my C# application. I know that C++ has the __LINE__, __FUNCTION__, and __FILE___ macros for getting this, but I cannot find a...
7
by: James P. | last post by:
Hello there, In my asp.net page using VB, I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is greater than or equal to the...
2
by: vegtard | last post by:
hi. i'm very new to python. just started looking at some online amateur guides for fun a few days ago. anyways, today i was sitting here staring at the wall, and i decided to make probably the most...
41
by: Cartoper | last post by:
I hear it is possible to disable the web browsers print function, does anyone know how to do that?
2
by: reddysankar | last post by:
Hello everyone, Is there any statement or code in c# using which i can print the current system time and date on button click.
6
by: trytobreak | last post by:
Hi All, I am a network administrator in a fairly large software company and I would like to write myself a small utility, which would connect (one by one) to all machines on the network and get...
3
by: itdaddy | last post by:
hey perl gurus! i am new to this forum cause i need help. I have done many scripts. but i want to use perl to do this: What I want to do is this. I have a QRP file that I can convert to a txt...
2
by: dmorand | last post by:
When I try to print a 'print version' of my page it looks fine in IE 7, but when I print in IE 6 the margins are all screwed up. The page itself looks the same in both browsers, it's just when I...
29
by: WannabePrgmr | last post by:
I am trying to display total numbers of data in a textbox, "Textbox200" on a form "Master", but I only want to display current daily data. I currently get the data from: Me.Text200 = DCount("",...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.