Pages

Total Pageviews

Add This

Showing posts with label Date and Time. Show all posts
Showing posts with label Date and Time. Show all posts

Monday, June 6, 2011

Get the month Name

You have to create a button and write the code bellow:

Dim getdate As Date
getdate = Now
 

MessageBox.Show("Month name: " & getdate.ToString("MMMM"), _
    "Date exercise")


When you execute the form you will get the same as on the picture:

Get Weekday name

To get the WeekDay name you have to create a button like on the picture bellow:




After, write the code:

    Dim getdate As Date

        getdate = Now

        MessageBox.Show("Weekday name: " & getdate.ToString("dddd"), _
    "Date exercise")


The resul is as on the picture bellow:

Tuesday, May 17, 2011

Oledb & Listview & Microsoft Access 2003

This project is developed to show you practically how to manipulate Visual Basic 2010 project and Microsoft Access 2003. The functions here are Add, Edit and Delete record. The populating is made in ListView control. The connection adapter used here is Microsoft.Ace.Oledb.12.

Wednesday, May 11, 2011

Get yesterday's date

DateTimePicker1.Value = DateTime.Today.AddDays(-1)

Hour


DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = "yyyy/MM/dd"

Now


Return encoded value representing the current date and time!

Label1.Text = Now

TimeString

Set or return the current time from the system clock!


Label1.Text = TimeString 

DateString


Set or return the current date from the system clock!

Label1.Text = DateString