Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2012, 11:51 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Change format of date when using Now function in VB code Windows 7 32bit Change format of date when using Now function in VB code Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

You need to use the Range.NumberFormat property. Something like this:


Code:
With Range("T" & target.Row)
    .Value = Now
    .NumberFormat = "dd/mm/yy - hh:mm"
End With
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change format of date when using Now function in VB code VBA code to change carlleese24 Excel Programming 2 08-13-2011 09:48 AM
Change format of date when using Now function in VB code Today's Date Function freschij Excel 3 02-11-2011 10:21 AM
Automatic Date Function Corrupting Printer Output Theodulf Word 0 05-28-2010 12:33 PM
Date Function in word? aligahk06 Word 1 04-21-2010 06:33 AM
Change format of date when using Now function in VB code Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft