Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2008

Tip: Looking for answers? Try searching our database.

Date Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan E. Acuña K. - 11 Feb 2008 14:50 GMT
I am using a Macro Public Function in Excel which format the date:

Optional Formato As String = "dd mmmm yyyy" _
                       ) As Variant

this display by example 11 Febrero 2008,
but I need to display     11 de Febrero de 2008

It's possible to change to this format?

Thanks for your help

Complete Macro:
Public Function FechaSi( _
 Optional Condicion As Variant = "", _
 Optional SiCumple As Variant = "", _
 Optional SiNoCumple As Variant = "", _
 Optional Formato As String = "dd mmmm yyyy" _
                       ) As Variant
 If Condicion = "" Or Condicion = True Then
   If SiCumple = "" Then
     SiCumple = Format(Now, Formato)
   ElseIf IsDate(SiCumple) Then
     SiCumple = Format(CLng(CDate(SiCumple)), Formato)
   End If
   FechaSi = SiCumple
 Else
   If IsDate(SiNoCumple) Then SiNoCumple = _
     Format(CLng(CDate(SiNoCumple)), Formato)
   FechaSi = SiNoCumple
 End If
End Function
Tony Jollans - 11 Feb 2008 15:20 GMT
Try "dd \de mmmm \de yyyy"

Signature

Enjoy,
Tony

>I am using a Macro Public Function in Excel which format the date:
>
[quoted text clipped - 28 lines]
>  End If
> End Function
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.