Random Hadith

Narrated Yazid ibn al-Aswad: Jabir ibn Yazid ibn al-Aswad reported on the authority of his father: I prayed behind the Apostle of Allah (peace_be_upon_him). When he finished the prayer, he would [+] [Abu Dawud 002:0614]

Mutiara Hati

Cinta terbesar dan cinta hakiki bagi orang yang beriman ialah cinta kepada Allah. Sehingga cinta kepada Allah-lah yang seharusnya menjadi motivator terbesar dan tidak terbatas

Announcement

 

June 2010
M T W T F S S
« May   Sep »
 123456
78910111213
14151617181920
21222324252627
282930  

Archives

Categories

Tags

free counters

Fungsi STOD (Microsoft Visual FoxPro)

Fungsi STOD (String to Date) adalah fungsi buatan sendiri yang bertugas untuk melakukan
konversi data tanggal yang berbentuk string ke bentuk data yang bertype tanggal.

1
2
3
4
5
6
7
8
9
10
11
FUNCTION STOD
LPARAMETERS string_date
LOCAL lc_a
 
SET DATE TO BRITISH
lc_a=string_date
lc_a=IIF(TYPE("lc_a")#"C",DTOS(DATE()),lc_a)
lc_a=IIF(LEN(ALLTRIM(lc_a))<>8,SPACE(8),lc_a)
lc_a=RIGHT(lc_a,2)+"/"+SUBSTR(lc_a,5,2)+"/"+LEFT(lc_a,4)
 
RETURN CTOD(lc_a)

Simpan listing program di atas pada sebuah file sebagai contoh PRCUMUM.PRG
Perhatikan penggunaan fungsi ini

SET PROCEDURE TO PRCUMUM

A=”20081231″
? stod(a)
31/12/2008

dalam Microsoft Visual FoxPro lawan dari fungsi ini adalah fungsi DTOS().

Popularity: 4% [?]

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

CommentLuv badge
[+] kaskus emoticons nartzco
What is 10 + 15 ?
Please leave these two fields as-is: