for example i have Sep10
i need to change it 09/10/2009
could you help me
Printable View
for example i have Sep10
i need to change it 09/10/2009
could you help me
Where is Sep10 stored and how is it stored? Is it stored as date or string? Are you doing it in Excel?
sep10 is always a string
cdate("sep 10"), will give the result you want
cdate("sep10"), will give type mismatch error
Sep.10 as string
and convert into date as mm//dd/yyyy
kamakshi, since it is a string, you need to be clear...
Is it
"Sep.10"
"Sep10" or
"Sep 10" ?
text is Sept.10
Try this...
vb Code:
Sub Sample() Dim strDate As String strDate = "Sep.10" strDate = Replace(strDate, ".", " ") 'MsgBox Format(strDate, "dd/mm/yyyy") MsgBox Format(strDate, "dd/mm") & "/2009" End Sub