FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour date() format like "dd/mm/yyyy"? (Solved)
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM

date() format like "dd/mm/yyyy"? (Solved)

Posted: Fri Jan 02, 2009 01:52 PM
Dear Antonio, James, Uwe and friends.

I have a simple doubt about date functions

With twice function bellow, I get the date in format "dd/mm/yy"
? fileDate( "C:\apps\myApp.exe" ) 
? date()


and my configurations is here:

SET DATE BRITISH
SET CENTURY ON
SET( _SET_EPOCH, 1950 )

How I can get the date in this format "dd/mm/yyyy"??
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: date() format like "dd/mm/yyyy"?

Posted: Fri Jan 02, 2009 02:06 PM

Hello JC,

Just add the line for the format, You need :

SET DATE FORMAT TO "DD/MM/YYYY"
( SET DATE FORMAT TO "DD.MM.YYYY" )

ddate := CTOD( "29/12/2008" ) // Date()

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 682
Joined: Tue Feb 14, 2006 09:48 AM

Re: date() format like "dd/mm/yyyy"?

Posted: Fri Jan 02, 2009 02:08 PM
Set( _SET_DATEFORMAT, "dd/mm/yyyy")
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM

Re: date() format like "dd/mm/yyyy"?

Posted: Fri Jan 02, 2009 02:17 PM

Uwe and Biel,

Thank you! Worked very well and much more simple!

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: date() format like "dd/mm/yyyy"?

Posted: Fri Jan 02, 2009 05:25 PM
JC wrote:Dear Antonio, James, Uwe and friends.

I have a simple doubt about date functions

With twice function bellow, I get the date in format "dd/mm/yy"
? fileDate( "C:\apps\myApp.exe" ) 
? date()


and my configurations is here:

SET DATE BRITISH
SET CENTURY ON
SET( _SET_EPOCH, 1950 )

How I can get the date in this format "dd/mm/yyyy"??


The following sample works perfectly here:

#include "Fivewin.ch"


FUNCTION MAIN()

    SET CENTURY ON
    SET DATE BRITISH

    ? DATE()

    RETURN NIL


EMG

Continue the discussion