[lazarus] FormatDateTime()

hernan.et at pg.com hernan.et at pg.com
Thu Mar 27 17:45:59 EST 2003


No it does not work even if you set DateSeparator := '/' you can try to use
FormatDateTime('m"/"d"/"y',Now) to get the desired result.

Regards,

Yoyong


                                                                
 Internet Mail Message                                          
 Received from host:                                            
 svcr-216-37-230-2.dsl.svcr.epix.net                            
 [216.37.230.2]                                                 
                                                                


From: Michael Van Canneyt <michael.vancanneyt at wisa.be> on 03/27/2003 08:23 AM
GMT
                                                                                   
          Michael Van Canneyt           To:   Lazarus List <lazarus at miraclec.com>  
 <michael.vancanneyt at wisa.be>           Cc:    (bcc: Yoyong Hernan-ET/PGI)         
                                Subject:      Re: [lazarus] FormatDateTime()       
                                                                                   
          03/27/2003 04:23 PM                                                      
            Please respond to                                                      
         lazarus at miraclec.com                                                      
                                                                                   







On 26 Mar 2003, Tony Maro wrote:

> Can anyone help me figure out why:
> FormatDateTime('MM/DD/YYYY', ThisDate)
> always results in something looking like:
> MM-DD-YYYY
>
> It replaces my chosen slash with a dash.
>
> That's fine for you foreigner's, but us warmongering Americans like
> slashes in our dates. ;-)
>
> I know it's an FPC and not a Lazarus question, just wondering if someone
> knows an easy workaround.  So far I'm having to manual separate out a
> date and reconstruct it myself to get what I want.

You should set the 'DateSeparator' char (in sysutils) to '/' instead of
the defalt '-'. Then all date routines will use /...

If someone knows how to obtain these values from Linux, let me know, and
I'll have them initialized correctly from the OS environment. Same for
timeseparator
shorttimeformat
longtimeformat
Decimalseparator
thousandseparator
Currencydecimals
Currencystring

Michael.

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives







More information about the Lazarus mailing list