Delphi : Date and Time Format from ddd-mm-yy to mm/dd/yyyy

i had a case a few weeks back of a problem where the computer needs to have a date format of dd-mmm-yy which in today’s date is 21-Feb-18. What i need is for the program to act the same as it was with the format 02/21/2018.

After digging data, i came across these gems of a find. It’s so short and so obvious, i hope this code can help somebody out

Enjoy

Coffee Cup

 

 

 

{
CurrencyString, CurrencyFormat, NegCurrFormat, ThousandSeparator,
DecimalSeparator, CurrencyDecimals, DateSeparator, ShortDateFormat,
LongDateFormat, TimeSeparator, TimeAMString, TimePMString,
ShortTimeFormat, LongTimeFormat

//Change COMPUTER date and time
SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, ‘MM/dd/yyyy’);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0,
SMTO_ABORTIFHUNG, 1000, PDWord(Nil)^);

//Change formatting from within the APPLICATION
DateSeparator := ‘/’;
ShortDateFormat := ‘MM/dd/yyyy’;

SetLocaleInfo(DefaultLCID, LOCALE_SSHORTDATE, ‘m/d/yy’) (short form) and
SetLocaleInfo(DefaultLCID, LOCALE_SLONGDATE, ‘mmmm d, yyyy’) (long form)

SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, ‘MM/dd/yyyy’);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0,
SMTO_ABORTIFHUNG, 1000, PDWord(Nil)^);
}

// Change the display formatting
DateSeparator := ‘/’;
ShortDateFormat := ‘MM/dd/yyyy’;

Hyper Threading to Single Thread

If you are looking for a software that will bridge your delphi application and your interbase application that is freeware, look no further. I found this program while researching since i cannot install delphi during deployment because it needs a serial key. Now, you don’t need to.

Here are the links. Please try only one. They all link to the same file. But just in case one of the links fail, at least you have other options to reach them.

http://www.indishare.me/79wawf5nnord

http://verified-download.com/file/36L9866

https://uploadocean.com/4r1mzjqiz7fw

https://dailyuploads.net/8uksbvfx4apm

https://www.megaupload.us/1NlH/20180218_Interbase_Hyper_Threading_to_SIngle_Thread.7z

http://agileurbia.com/CVW

 

 

Interbase Server 6.01 IBServer601

If you are looking for a software that will bridge your delphi application and your interbase application that is freeware, look no further. I found this program while researching since i cannot install delphi during deployment because it needs a serial key. Now, you don’t need to.

Here are the links. Please try only one. They all link to the same file. But just in case one of the links fail, at least you have other options to reach them.

http://www.indishare.me/crwiuhtl4orc

http://reliablefiles.com/file/36L9867

https://uploadocean.com/4gc6yik3rkk3

https://dailyuploads.net/xiusw41u9hs2

https://www.megaupload.us/1NlI/20180218_Interbase_Server_6.01_IBServer601.7z

http://agileurbia.com/CX4

 

 

Interbase : IB Client Freeware

If you are looking for a software that will bridge your delphi application and your interbase application that is freeware, look no further. I found this IB client program while researching since i cannot install delphi during deployment because it needs a serial key. Now, you don’t need to.

Here are the links. Please try only one. They all link to the same file. But just in case one of the links fail, at least you have other options to reach them.

http://www.indishare.me/r56pgf38bysj

http://filerack.net/file/36L9865

https://uploadocean.com/04pdw1dr0nxw

https://dailyuploads.net/h38drei09qth

https://www.megaupload.us/1NlG/20180218_Interbase_Client_IB.7z

http://agileurbia.com/CUh

 

Delphi : Borland Database Engine (BDE) Freeware

If you are looking for a software that will bridge your delphi application and your interbase application that is freeware, look no further. I found this program while researching since i cannot install delphi during deployment because it needs a serial key. Now, you don’t need to.

Here are the links. Please try only one. They all link to the same file. But just in case one of the links fail, at least you have other options to reach them.

http://www.indishare.me/9eoytymglcyf

http://downloadity.net/file/36L9864

https://uploadocean.com/be2vntyuw74j

https://dailyuploads.net/ywnlecobuaeq

https://www.megaupload.us/1NlF/20180218_Borland_Database_Engine_BDE.7z

http://agileurbia.com/CQH

 

Delphi : Parse or Explode a string based on a parameter field

this is a small code that i put together to convert the date time format of “2017-11-18 08:25” to the date time format that i am using right now which is “11/18/2017 8:25:00 AM”.  For now i will make due with this one and so far it works.

enjoy,

coffee cup

 

 

var
vDATE : TDateTime;
vPOS : Integer;
vList : TStrings;
begin
//convert from 2017-11-18 08:25
//convert to 11/18/2017 8:25:00 AM

vPOS := POS(‘ ‘, edtDATE_ORIG.Text);

edtDATE_CHOP.Text := Trim(Copy(edtDATE_ORIG.Text,1, vPOS));
edtTIME_CHOP.Text := Trim(Copy(edtDATE_ORIG.Text,vPOS + 1, 100));

vList := TStringList.Create;
try
ExtractStrings([‘-‘], [], PChar(edtDATE_CHOP.Text), vList);

edtYEAR.Text := vList.Strings[0];
edtMONTH.Text := vList.Strings[1];
edtDAY.Text := vList.Strings[2];

//year, month, day
edtDATE_CURR.Text := edtMONTH.Text + ‘/’ + edtDAY.Text + ‘/’ + edtYEAR.Text;
vDATE := StrToDateTime(edtDATE_CURR.Text + ‘ ‘ + edtTIME_CHOP.Text);
edtDATETIME.Text := DateTimeToStr(vDATE);

finally
vList.Free;
end;

Windows 7 : How to access the advanced boot options on your laptop

If you are a windows pc user for quite some time, accessing the Windows 7 to see the Advanced Boot Options can be a challenge if you are using different laptop brands. Here are the list of shortcut key combinations

Enjoy

Coffee Cup

 

Acer – Alt + F10

Asus – F9

Dell/Alienware – F8

HP – F11

Lenovo – F11

MSI – F3

Samsung – F4

Sony – F10

Toshiba – 0 (not numpad) while turning on, release key when Toshiba logo appears

 

Windows : How to restart or shutdown your computer in command line or DOS mode

I know what you’re thinking, how come you need to know this thing if there is a shutdown or restart button.  Well, extra wisdom is better than nothing. I had a case where the shutdown and restart button is missing. My first guess is that the pc has been infected with a virus.

But just in case you encounter this scenario and you have the run command, you can type the following line

To shut down your computer, type: shutdown /s

To restart your compute,r type: shutdown /r

To log off your computer, type: shutdown /l

For a complete list of options, type: shutdown /?

After typing your chosen option, press Enter. The computer will execute your desired task.

How to add or remove password in MS Excel 2007

Had to chance up on encountering this problem again. Fortunately, you need to follow these steps in order to add or remove passwords in MS Excel 2007.

I have made a youtube video to show both the short version and the long version on how to achieve this.

For the short version here are the steps

Open Microsoft Excel 2017 workbook
Open the file to add or remove the password
Click the ORB logo on the top left
Click the ‘Save As’ button
Click the ‘Tools’ button and then click ‘General Options‘ tab
In the ‘Password to open’ box, add or delete the existing password then click ‘OK’.
Click the ‘Save’ button. If prompted, click ‘Yes’ to replace the existing workbook

Enjoy

Coffee Cup

Windows Server 2012 R2 Socket Network Error

Today is a new day. Mark and I installed a new windows server 2012 r2 and have also installed the drivers and software. We started using the Server Guide downloaded from the Lenovo Website and then the Operating System.

After installing, i loaded my app and hoped that it would run smoothly as always. But no, it did not push through as expected. I assigned the server with an ip address of #15. I use the DOS prompt ping and the ipaddress replied. I tried to look at the My Computer and typing the server name, and you can see the shared folders.

This is the whole message…
“EXCEPTION EBDE ENGINE ERROR IN MODULE XXX.EXE AT 00096F36. UNKNOWN DATABASE. UNABLE TO COMPLETE NETWORK REQUEST TO HOST ERVER_NAME? FAILED TO ESTABLISH A CONNECTION. A SOCKET OPERATION WAS ATTEMPTED TO A GENERAL SQL ERROR. UNREACHEABLE NETWORK ALIAS”

The error kept mentioning socket connection that was not successfuly. So what i did changed the ip address again. Lo and behold, i was able to run my app. Usually in normal windows pc the system should let you know if you have an ip address conflict. In this case, the server did not show that little dialog box.

It has been a very educational experience with conflicting ip address that in the windows server does not show you. Please note that the ip address belonged to a belkin device and not a PC or laptop. Maybe that could be the cause.

I tried to replicate the scenario in my Windows 7 pc and my pc reacted with a small message dialog of IP CONFLICT.

I have created a youtube video to show my adventure

Happy watching

Coffee Cup