• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Excel VBA - Rertun Date Value minus time

Hi, how do I refer to a cell with date and time and grab only the date?

Msgbox Tag = Sheets("TEST").Range("G2")      gives me a whole date and time found in G2, and I just want date in a given format, e.g., dd/mm/yy

Tks,

N2V
0
NewToVBA
Asked:
NewToVBA
1 Solution
 
SiddharthRoutCommented:
Msgbox Format(Sheets("TEST").Range("G2"),"dd/mm/yy")

Sid
0
 
NewToVBAAuthor Commented:
Excellent, thank you, Sid. As I said a week ago, I want to learn from you.... :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now