Thursday, April 3, 2014

Powerbuilder Function to Get Last Date in Month

This function is to get last date in particular month

Create a function named f_lastdate

Specify a date type as return value
Specify a date type parameter name dTgl, then type this script below

1:  integer iMonth, iDate  
2:  iMonth = Month(dTgl)  
3:  CHOOSE CASE iMonth  
4:       CASE 1, 3, 5, 7, 8, 10, 12  
5:            iDate = 31  
6:       CASE 4, 6, 9, 11  
7:            iDate = 30       
8:       CASE 2  
9:            IF isDate( '29/' + String(iMonth) + '/' + String(Year(dTgl))) THEN  
10:                 iDate = 29  
11:            ELSE  
12:                 iDate = 28  
13:            END IF  
14:  END CHOOSE       
15:  dTgl = Date( String(iDate) + '/' + String(iMonth) + '/' + String(Year(dTgl)))  
16:  RETURN dTgl  

To use the function, use this script

1:  Date dLastDate  
2:  dLastDate = f_lastdate(today())  

dLastDate value should be: 30 April 2014, if assume today is 3rd April 2014.

Saturday, March 1, 2014

Samsung Galaxy S5 vs. Apple iPhone 5S vs. Google Nexus 5

This article was taken from IT World, and wrote by Jon Gold

Samsung made the Galaxy S5 official on Monday at a Mobile World Congress presentation in Barcelona, touting a slimmed-down approach to the latest flagship's feature set and simplified design.
It's a small but notable departure for the South Korean company, whose devices all too frequently combine undeniable engineering brilliance with a glut of marginally useful features. Co-CEO J.K. Shin and other Samsung executives who presented at the event were eager to talk up the way in which the company had listened to input from their customers.

Wednesday, September 11, 2013

Apple officially unveils the iPhone 5s, coming September 20

Just as expected, the newly introduced Apple iPhone 5s looks the same on the outside (if you don't count the new white with gold/champagne color option). It still has the same thin 7.6mm profile and it still weighs merely 112g. However it comes with a number of changes under the hood where pretty much all the work has gone into this time around.