Templar
To extract date part from a timestamp you can use hb_TtoD function:
dCreate := hb_TtoD(tCreate)
File dates
Moderator: Rathinagiri
- mustafa
- Posts: 1175
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: File dates
For the date to come out well --> dd.mm.yyyy
did this occur to me?
Greetings to Master KDJ
PD: Best solution: the contribution of the Master KDJ
Regards
Mustafa
did this occur to me?
Greetings to Master KDJ
Code: Select all
SET DATE GERMAN
SET CENTURY ON
SET CODEPAGE TO UNICODE
....
IF ! oFolder:IsRootFolder
tCreated := oFolder:DateCreated
dCreate := hb_TtoD(tCreated) // <--- KDJ solution
Pro1DiaS := SUBSTR( hb_TStoStr(tCreated) ,9,2 )
Pro1MESX := SUBSTR( hb_TStoStr(tCreated) ,6,2 )
Pro1ANYO := SUBSTR( hb_TStoStr(tCreated) ,1,4 )
Atox1 := Pro1DiaS +"."+ Pro1MESX +"."+ Pro1ANYO // Fecha Correctas
Atox2 := SUBSTR( hb_TStoStr(tCreated) ,12,8 )
MsgBox( dCreate ) // <--- KDJ solution
MsgBox("Folder:" + CRLF + CRLF + cFolder + CRLF + CRLF + "has been created: "+ Atox1 + SPACE(1) + Atox2 , "Success")
* MsgBox("Folder:" + CRLF + cFolder + CRLF + CRLF + "has been created: " + hb_TStoStr(tCreated) , "Success")
ELSE
.......
Regards
Mustafa
Re: File dates
Ah but where is " hb_TtoD" ? It's not in the standard library!
- serge_girard
- Posts: 3364
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: File dates
Harbour is so extended, one cannot remember all !
There's nothing you can do that can't be done...
Re: File dates
Right, thanks for that; got it sorted finally!!
Templar
Templar