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

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

Postby JC » Fri Jan 02, 2009 1: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"
Code: Select all  Expand view
? 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"??
Last edited by JC on Tue Jan 06, 2009 4:59 pm, edited 1 time in total.
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

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

Postby ukoenig » Fri Jan 02, 2009 2: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby Biel EA6DD » Fri Jan 02, 2009 2:08 pm

Code: Select all  Expand view
Set( _SET_DATEFORMAT, "dd/mm/yyyy")
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca

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

Postby JC » Fri Jan 02, 2009 2: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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

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

Postby Enrico Maria Giordano » Fri Jan 02, 2009 5: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"
Code: Select all  Expand view
? 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:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    SET CENTURY ON
    SET DATE BRITISH

    ? DATE()

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests