-
Excel Date formatting issue
Hi all,
I am rather new to VBA. In my excel file, the date value is 1/5/2018 7:18:32 AM. However, as seen from the image, the AM/PM sign is missing. I need to copy the values over using VBA, but the result is the same, it still shows without AM/PM. I need it to be in this exact format. How can I achieve this?
vbaDate.PNG
Cheers,
Jack
-
something like:
Selection.NumberFormat = "d/m/yyyy h:mm:ss AM/PM"
or
Selection.NumberFormat = "m/d/yyyy h:mm:ss AM/PM"
(I can't tell from your example whether the format is day/month year of month/day/year).
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules