Good day!
I have a program built using Powerbuilder and uses MS SQL as its database, running on windows XP OS. I have a window that works as a date prompt. This window serves as an interface for the user to enter the date range of the report to be generated. It was working for about 3 months but just the other day it stopped functioning. I tried to use a message prompt to see if it is getting the correct date, on powerbuilder the correct date is being shown. But once it has been processed on the SQL side, the date becomes '1900-01-01'. Below are some of the codes:
"open(w_date_prompt_with_time)
ls_msg = Message.StringParm
If IsNull(ls_msg) Then Return -1
li_tab = Pos(ls_msg, ";", 1)
ls_dateTimefrom = left(ls_msg,li_tab – 1 )
ls_dateTimeto = right(ls_msg,li_tab – 1 )
li_tab = POS(ls_dateTimefrom, " ", 1)
ldt_from = DATETIME( DATE(left(ls_dateTimefrom, li_tab – 1)),TIME(Right(ls_dateTimefrom, 5 )))
ldt_to = DATETIME( DATE(left(ls_dateTimeto, li_tab – 1)),TIME(Right(ls_dateTimeto, 5 )))
//ib_get_all = false
li_count=dw_rowmanager.Retrieve(ldt_from,ldt_to)"
Â
Thanks in advance.
Powerbuilder/SQL on Windows XP: date becomes ‘1900-01-01’
Hello,
Power Builder date function does not work properly when you have a string argument. PowerBuilder tries to search for a match in the regional setting of your computer and as a result PowerBuilder is not able to find a match. SQL server is not the problem.Â
Your PowerBuilder has some bugs that need to be fixed. You should go to this site to check for a new release and bug fix.
I hope that this is helpful.
Powerbuilder/SQL on Windows XP: date becomes ‘1900-01-01’
Hi Friend,
According to my all information, I think here is the problem with your Power builder date function not with SQL server when you use a string argument. So, You have to use another Power builder whose all functions work properly and also compatibly with your SQL server or you should fix your Power builder. My recommendation to you that use latest power builder which has the latest functions and of course not bugs.
I hope this will help You. Have a good day.