By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

System Date

P: 56
Every time my VB program runs, i want it to fetch the date from system and use it in variouos forms. how do i do that?
Jan 18 '08 #1
Share this Question
Share on Google+
8 Replies


debasisdas
Expert 5K+
P: 8,127
Simply you can use DATE function.It returns the systemdate.
Jan 18 '08 #2

QVeen72
Expert 100+
P: 1,445
Every time my VB program runs, i want it to fetch the date from system and use it in variouos forms. how do i do that?
Text1.Text = Date

Regards
Veena
Jan 18 '08 #3

VACEPROGRAMER
100+
P: 168
TextBox1.Text = DateString
TextBox2.Text = TImeString


Vace
Jan 19 '08 #4

Expert 5K+
P: 8,434
Keep in mind that the specific syntax, and system variable name, may vary depending on what version of VB you're using. For instance, in VB6 I would normally use Now to return the current system date/time.
Jan 21 '08 #5

VACEPROGRAMER
100+
P: 168
Visual Basic 2003 and Visual Basic 2005

Vace
Jan 24 '08 #6

P: 56
But NOW gives the date in form of mm/dd/yy. what if i want it as dd/mm/yy???
Jan 25 '08 #7

QVeen72
Expert 100+
P: 1,445
Hi,

Text1.Text = Format(Now, "dd/mm/yyyy")

Regards
Veena
Jan 25 '08 #8

debasisdas
Expert 5K+
P: 8,127
But NOW gives the date in form of mm/dd/yy. what if i want it as dd/mm/yy???
try to sue this Format(Date, "dd-mm-yy")
Jan 25 '08 #9

Post your reply

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