Help with Time Statement

HDfatboy03

Board Regular
Joined
May 23, 2010
Messages
62
Hello

I'm working on creating a time stamp for work. Currently we are using a paper time sheet and I believe it would be simpler if we used excel.

Below is a statement that works for the date

S T A R T C O D E

Private Sub UserForm_Initialize()
'adds date automatically
Me.txtDate.Value = Format(Date, "Medium Date")
End Sub

E N D C O D E

Is there a way to use a statement like the one above to automatically add the current time (ex. 09:03) and the Day of the week (ex. Monday, Tuesday, Wednesday ... etc)

Any help will be great appreciated

Thanks in advance
HDfatboy03
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You could change Date to Now and change the formatting string to something like "dddd dd mmmm yyyy hh:mm".

Obviously you can play around with the format.:)
 
Upvote 0
I figured out the time stamp ... but still can't figure out the day of the week (ex. Monday, Tuesday, Wednesday ...etc.) Do you or anyone have any ideas ???

the code below works

Me.txtTime.Value = Format(Time, "medium time")

Thanks for any suggestions or help
 
Upvote 0
Well the format I posted worked fine for the day of the week.

I don't know if there is a named format that includes the day of the week, so you might need to use a custom one like that.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top