Jump to content
Sign in to follow this  
mus3na

Date Manipulation

Recommended Posts

assalammualaikum dan salam sejahtera.

kali ni aku ada masalah ngan nak manipulate date. maklumla bila read date dari database (MSACCESS) dia hantar dalam format (dd/mm/yyyy). kalau dia hantar ddmmyyyy sahaja senang, aku leh gunakan standard numeric operation utk manipulation, tapi dia ada "/" dalam tu, so payah sikit.

aku terpikir nak gunakan cara ASCII cam dalam soalan sebelumni utk buang "/" tapi tak pasti ni cara yg practical atau tidak. so tanya pendapat org yg lebih berpengalaman dulu.

contoh program.

Date1 = 01/01/2001

Date2 = 05/05/2005

Date = user input.

if Date <= Date1 then
   operation1
elseif Date >= Date2 then
   operation2
else
   operation3
end if

so sapa leh guide aku camana nak manipulate date utk operation cam diatas. thanks in advance

Share this post


Link to post
Share on other sites

ala apa susah22 ko guna format jerrr

contoh

if Date <= format(Date1,"dd/MM/yyyy") then

operation1

elseif Date >= format(Date2,"dd/MM/yyyy") then

operation2

else

operation3

end if

haa.. ok

try gppd luck then

oo

ko kena retrieve date1 n date 2 tu dari database aaa

baru aaa leh check sama ker takk

ok adiosaaa

ohaiyoo

yobasayo

Share this post


Link to post
Share on other sites

thanks, korang memang best. tak terpikir lak aku leh pakai format dalam date manipulation.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...