Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, i have been trying write a marco to extract the date portio from date:time. The problem is the latter(date:time) is in strin format and when i used the left() function to extract the date, i automatically converts into date format. How can i prevent this?? Thanks for your help -- ylrin ----------------------------------------------------------------------- ylrino's Profile: http://www.excelforum.com/member.php...fo&userid=3488 View this thread: http://www.excelforum.com/showthread.php?threadid=54627 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Yltino,
Try something like: Dim rng As Range Set rng = Range("A1") With rng .Value = CStr(Int(.Value)) End With --- Regards, Norman "ylrino" wrote in message ... Hi all, i have been trying write a marco to extract the date portion from date:time. The problem is the latter(date:time) is in string format and when i used the left() function to extract the date, it automatically converts into date format. How can i prevent this?? Thanks for your help. -- ylrino ------------------------------------------------------------------------ ylrino's Profile: http://www.excelforum.com/member.php...o&userid=34883 View this thread: http://www.excelforum.com/showthread...hreadid=546279 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent text converting to date in copy&pasting tables | Excel Discussion (Misc queries) | |||
How do I prevent Excel from auto-correcting the date format? | Excel Discussion (Misc queries) | |||
prevent 4/5 in a cell automatically transfer to a date format | Excel Discussion (Misc queries) | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |