Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

System Date Compared Against A String


Back again! (great site - very helpful)

Is it possible to compare the system date with a written date?
I've shown the current date by:

Label1.caption = date

I've a list box which has several dates which the user clicks
on to obtain information for that particular date. These dates I've displayed by just putting them in quotes i.e. "10th April 2001".

Can I check these dates against the system date and disable the choice should the date have passed?

Any help gratefully received



View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Compared String
How can i compare a string useing strComp and get the result of the changes, there can be other ways.

eg. 2 strings and 1 textbox..

string1 = "Hello 123"
string2 = "Hellm 132"

then i whant to get result from string1 that was changed in string2.
textbox = "m32"

its for sure a simple but havent figgured it out

Date Compared To Logical Date
I have 3 variables ( all integers)
and I would like to know if I can
use some function to see if they
are more then 90 days in the past
or more..

And if they are have a MSGBOX say
"This day is older then 90 days"



Setup Cannot Continue Because Some System Files Are Out Of Date On Your System.
I realized that many people, just like myself, were having problems with the Package and Deployment Wizard for VB 6.0 and when trying to install their program on another PC they were getting the following message:

"Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to restart Windows before you can run setup again. Click cancel to exit setup without updating system files."

Microsoft addresses this issue in their Help and Support and proposes 8 solutions.

However, I found out that the problem was coming from the Bootstrap files in the Setup.LST file.
If you open Setup.LST (generated with the wizard) you'll see something like this:

[Bootstrap Files]
File1=@VB6STKIT.DLL,$(WinSysPathSysFile),,,3 25 99 11:00:00 PM,101888,
File2=@MSVCRT40.DLL,$(WinSysPathSysFile),,,5 30 98 11:00:00 PM,326656,
File3=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5 30 98 11:00:00 PM,22288,4.71.1460.1
File4=@stdole2.tlb,$(WinSysPathSysFile),$(TLBRegister),,8 23 01 1:00:00 PM,17920,3.50.5014.0
File5=@asycfilt.dll,$(WinSysPathSysFile),,,8 4 04 8:56:41 AM,65024,5.1.2600.2180
File6=@olepro32.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:44 AM,83456,5.1.2600.2180
File7=@oleaut32.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:44 AM,553472,5.1.2600.2180
File8=@msvbvm60.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:43 AM,1392671,

Files 1 through 3 are needed to run your VB 6.0 program, but Files 4 through 8 were the ones that were "out of date" and caused the error. Since the host PC will most certainly have these files, there is no need for your program to install them (or even update them). So you can just insert a colon ";" in front of the lines for File 4 through 8 for the installation to ignore these commands.

So open your Setup.LST and change it like this:

[Bootstrap Files]
File1=@VB6STKIT.DLL,$(WinSysPathSysFile),,,3 25 99 11:00:00 PM,101888,
File2=@MSVCRT40.DLL,$(WinSysPathSysFile),,,5 30 98 11:00:00 PM,326656,
File3=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5 30 98 11:00:00 PM,22288,4.71.1460.1
;File4=@stdole2.tlb,$(WinSysPathSysFile),$(TLBRegister),,8 23 01 1:00:00 PM,17920,3.50.5014.0
;File5=@asycfilt.dll,$(WinSysPathSysFile),,,8 4 04 8:56:41 AM,65024,5.1.2600.2180
;File6=@olepro32.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:44 AM,83456,5.1.2600.2180
;File7=@oleaut32.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:44 AM,553472,5.1.2600.2180
;File8=@msvbvm60.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,8 4 04 8:56:43 AM,1392671,

Save it, close it, and try installing your program again.

Note: You may have other DLL files than those listed above, so you have to make sure which ones are the one out of date.

Hope this helps some of you out there.

Setup Cannot Continue Because Some System Files Are Out Of Date On Your System
I am getting this error when i am trying to install my application in client workstations. the application was developed in office xp sp2. it's working without any problem in some computers but not in few xp computers and all of windows 2000 computers. i tried running vb60.exe and scripten.exe. i read that updating oleaut32.dll can also solve the problem. so i copied that file from my computer to those computers and it worked in one but didn't in others.

anyway i can solve this problem?

Setup Cannot Continue Because Some System Files Are Out Of Date On Your System.

I am having problem in installing the VB package into one of the computer. I packaged all my VB installation files using PDWizard, and I have successfully installed it on the other computer. Both computer are running Windows XP.

This is the error that I've got:

Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files now. You will need to restart Windows before you can run setup again. Click Cancel to exit setup without updating system files.

I have tried to restart and reinstalled, but it prompted me the same error message again and again. I have update the MDAC to version 2.8. I have also tried to disable the Norton Antivirus since I read that maybe the .olb file in Norton uses different version as Windows.

Did anybody encounter this problem before? I would appreciate if you can give me any solutions.


[SOLVE]I Need A SQL Command, How To Use Date Minus With System Date Know Its Last..
I need a SQL command, how to use date minus with system date know its last 3 day?

how to minus the date to know still have how many day left, but minimum but have 3day.... compare to system date...??

SELECT ProductNo, Gendate from ProductInfo
WHERE Gendate - date() = 3
GROUP BY ProductNo, Gendate

Retrieve Date From Novell Server (not System Date)

I'm looking for a way to retrieve the date (with or without the time
portion) from our Novell server on the network (rather than the machine's
system date) and store it in a timestamp variable, all from within a VB
program. But, I don't want the system date of the individual machine running
the program to be changed in the process.

Does anyone know if this is possible or even how I would go about doing this
from within my VB program?

Thanks for your help.

Comparing System Date With Fixed Date

Back again! (great site - very helpful)

Is it possible to compare the system date with a written date?
I've shown the current date by:

Label1.caption = date

I've a list box which has several dates which the user clicks
on to obtain information for that particular date. These dates I've displayed by just putting them in quotes i.e. "10th April 2001".

Can I check these dates against the system date and disable the choice should the date have passed?

Any help gratefully received



Tracking Of Date Time Without System Date
Hello again

Yeah am back with a q again ....

I need to keep track of the date and time without using the system date as that can easily be changed and with the change of date my software will hinder a lot .......

Harris Moin

Money System, Date System, Etc.
I am trying to create my first "Wrestling Simulator" and I have gotten stuck on trying to make the money system, date system, save system, and wrestler system work. I need to figure out how to make the money go up in certain cases and vice versa and when at 0 I need it to end the game. In the case of the Wrestler System, I need to find out how to make it say the name of the wrestler in matches, news, etc. without having to add 5x the amount of coding for each. The Date system and Save system are pretty self explanitory.

System Date And System Time
(on click of command button) how do i save the text in a textbox to a .txt file with "Log - " + system date + " - " + system time ? into the application's folder...

Date && Time Values In Date And String Format Differ
The program (debug) output below lists the last modification time of two files. File 1 is stored on a NTFS medium, file 2 sits on a FAT medium.

In order to be able to compare these dates, I need to round the odd seconds of the NTFS file up (FAT files have only even second values).

The lines after the file headers show the date & time value before and after the rounding, in date, double precision and string format.

file 1 (NTFS)
= 2005-07-12 08:57:09 = 38545,3730208333 = 2005-07-12 08:57:09
after rounding up
= 2005-07-12 08:57:10 = 38545,3730324074 = 2005-07-12 08:57:10

file 2 (FAT)
= 2005-07-12 08:57:10 = 38545,3730324074 = 2005-07-12 08:57:10

The strange thing is that when comparing these values, they appear to be different (!) both in date and double data format, not in string format.

2005-07-12 08:57:10 > 2005-07-12 08:57:10 (date format)
38545,3730324074 > 38545,3730324074 (double precision format)
2005-07-12 08:57:10 = 2005-07-12 08:57:10 (string format)

Any idea where this difference comes from?

Rounding up was done with DateAdd.

VB version 6, on XP.
Boiled down code has been attached.

"Setup Cannot Continue Because Some System Files Are Out Of Date On Your System"

I've created an install program with the package & deployment wizard that ships with vb6. When i try to intall my program on windows 2000 (can't really say if it is just windows 2000 at this point) I get the error:

"Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to re-start windows before you can run setup again. CLick cancel to exit setup without updating these files."

It seems no matter how many times I click ok and re-start the system, the message continues to pop up and wont let me install the program. Any suggestions?

Also, when i do successfully get the install to work on certain machines, it displays:

"An error occured while trying to register the file "C:windowssystem32msado25.tlb"


Thank you.

Compared Decimal !
i'm confused of this .... help please

i user must input any number in text1 "47" and then
that number inputed in text1 must devide to another number in text2,
there's a time that the answer have a decimal like 4532.64346.

Now i need to compare the number inputed in text1 and the answer but not the whole answer the decimal places only " .64346" .

If the decimal places " .64346 " is greater than the number inputed in text1 "47".

Because " .64346 " is greater than the " 47 " all i need is get the lower number in the decimal such as ' 46 ' because 46 is lower than 47.

I need only the code whose comparing and getting the number ....

im using of this but i dont know what is next ?

Text4.Text = Val(Text2.Text) / Val(Text3.Text)
For ctr = 1 To Len(Text1.Text)
If Val(Text4.Text) > Val(Text1.Text) Then
Text5.Text = Mid(Text4.Text, ctr, 10)
End If
Next ctr

Arrays In VB Compared To PHP

In java, C++, or PHP, I would create arrays like

int MyArr[] = array {value1, 2, 3...}

I need to make a constant like that in VB. How would I do that?

VB6 Deployment Issues Compared To .net
I developed an application in vb .net and used the installer that came with .net. I decided to redo the application in vb6 due to the .net framework issue and was curious to know if I can use the installer that came with .net to deploy a vb6 application. If so, does vb6 require a framework of sorts, if so what is it and do I need to include it with my vb6 setup?

Also, I used the PDW in vb6 and it created 3 files, a zip, setup and setup.lst file. I have the .net application on and it gets the current setup file from a link that has a .msi extension. Can I bundle these 3 new files into a .msi file? so I don't have to change the link I currently have? how do I do that? I'm trying to avoid having to pay another $80 or so to update the link...and just use the same one with a new vb6 setup at the other end.

I learned on .net so I'm unfamiliar with deploying on vb6..any help would be appreciated. Thanks.

VB .NET Extreemly Slow At Everything Compared To VB6
hi all,

i installed VB .NET lastnight... and tried to convert my VB6 app.. got forty nine errors..which i was crunching through...

after that... it just didint want to run... am using ADO/Access connection..

anyway.... the main thing is that its damn slow... very slow to compile..very slow to do anything!

on my 850MHZ it took 3 to 4 times longer to compile or run programs!

i found it really slow to work with too!

i think for this.. your gona need above 1.5 GHz or above with probably at least 256 RAM..

anyone shed any light or give their views on this?


Excel 2000 OLE Compared To 98
What is the deal with Outlook 2000 OLE? I have code (from here) about how to send an email, however I have a problem that any machine I use this code on, that has Outlook 2000 on it, besides any development machine, the program locks.

I went over the object again and again and I don't see flaws.

Actually, not that I think about it.. It might work only on Win2000 Pro machines.. Is there a bug with NT/outlook 2000 and vb6 sp4?

Thanks guys and gals

[VB6] Converting A Date String To Date Variable

I have some of the tutorial on how to convert string to date. But I find my problem abit different.

I have a log file that provide info in this form:

Thu Jul 9 11:00:00 GMT 2008 Some other Messages, length varies
Thu Jul 10 12:00:55 GMT 2008 More messages...

I tried to apply

dim date1 as date
date1 = #Thu Jul 9 11:00:00 GMT 2008#
but it's giving me error, i guess the compiler is not able to interpret it.
Plus I when the day is single digit there is 2 white space instead of 1 when on a 2digit day

So I will like to seek help on how to make it possible. Thanks.

String Date To Date Var, Mixed Locales
Is there anyway to tell VB "here is a string, it's got a date in it whose format is d/MM/yyyy, put it in a date var for me" when the machine it's running on is using a regional setting of MM/dd/yyyy?

I have already solved this problem by using the incoming date's format and mapping the incoming date parts to a string in the order of the machine's regional format. But this is really messy.

I have already tried on my MM/dd/yyyy machine running:

Dim dDate as Date
dDate = format("2/11/2003","dd/MM/yyyy")

and thought maybe dDate would contain "11/2/2003", or essentially "November 2, 2003", but it does not. (Don't try it with days higher than 13 or it will actually do it because MS is so smart.)

Balasan: Convert Date To String Date
txtTest.Text = format$(rsTest!SampleField, "dd/mm/yyyy")

Best Regards,
Ade Aan Wirama
Coding for Humanity - We do coding for humanity
** to join, send blank email to email@removed

Date String To Oracle Date Datatype
I have variable that holds a date string looking like this: '05312002140059'
[The format is read as: 'mm/dd/yyyy hh24:mi:ss']. I need to execute a stored procedure
in Oracle through VB. The date string comes from a tab delimited text file, which is
read into a string variable in VB. From there, I want to assign the value in the
string varible to the Command object's parameters. The error that I'm getting is
that the string's datatype is mismatched or invalid with the stored procedure's
data type. What am I doing wrong?!

Formatting A User Settings Date To A System Settings Date For Access

I have been trying to look for this on the forums somewhere, but to no avail.

I'm sure this is a common problem for people having to write code to support different locales using Access.

When looking for records (ie when performing an SQL statement with the 'WHERE' in it, Access only returns the system settings locale (ie the US one where short date is read as mm/dd/yyyy), but any date we enter using Date or Now uses the user settings date. Forcing a Format of Now to mm/dd/yyyy does not work as it passes the user settings date.

My question is then, how can I force a date to take the system settings date so no matter what date I have it will always be Access friendly.

E.g: Here's an example

1) User settings short date: d.M.yy

2) Format (Now, "mm/dd/yyyy") returns

8.4.02 and NOT 04/08/2002, which is what Access expects.

Date$ reads the system settings date but can it be used somehow to force a user settings date ???

This is urgent. Many thanks.


Advantage Of Database/Web App Compared To Excel
Please advise if I have all the advantages correct for creating a Server side web application front end and Access DB back end over using an Excel spreadsheet.

I migrated the Excel info into an Access 2000 database and added relational tables.

The web app positives over Excel:
- Advanced Search capability
- Reports that can be viewed from every record by way of search or topic listings
- Can store more info per field compared to Excel's limit on each cell size.
- Login GUI for better security
- Concurrent usage because current Excel spreadsheet locks everyone out if one person is using it.
- Web application (using Server side sw such as Cold Fusion which has a tag to output excel view) can still provide Excel output using Cf Excel tag.
- Can generate archive history info for each Project.

Can anyone advise anymore or modify what I have?

Rich Textboxes - VB As Compared To Delphi
Alright, the Rich TextBox is getting me incensed. I checked the forums for information, but I found nothing. So, here's my little problem:

In Delphi, all I had to do was type the following code:

RichEdit1.Lines.Add('add text here');
RichEdit1.Lines.Add('add more text here');

The result:

add text here
/* space */
add more text here

However, in Visual Basic 6.0, I can't enter text this way. No matter what, I always get the last text input to show up and nothing else. How can I achieve the above result using Rich Textboxes in Visual Basic? I must know. Thanks

"C/C++ you say? Ha, I've got Visual Basic!" - Me

Form_Terminate Procedure Compared To Form_Unload
What is the difference between Form_Terminate and Form_Unload? I have searched on the Internet for this and have yet to find anything.

Brandon Parker

Speed Of Loadpicture Compared To Manually Reading
Why is it that loadpicture can load a 1024x1024 bmp file in a fraction of a second, and when i read it in a byte array manually then draw it on the form with setpixel takes forever to do?

I need to be able to read in an 1024x1024 array and draw it in a picturebox instead of doing loadpicture (as the array is not the actual bmp file).

Any suggestions of speeding things up, rather than iterate over the 1024x1024 bytes and setpixel them one by one ?

DirectMusic 7: Poor Quality Compared To WinAmp
I've downloaded numerous program samples that play MIDI's using DirectMusic 7 and none of them compare in quality to WinAmp. How can I improve the quality in DirectMusic?

Even the sample that comes with the SDK has poor quality.

A few things I'm thinking it could be:

DirectMusic not using my soundcard?
Sample rate isn't set to 44.1KHz? Reverb?

Anyone who knows the answer out there?

Listview Performance Compared 2 Class Coll.
As my book says is a best practice, I have created a structure collection.
Now as I learn how to use a listview control, I have the complication of trying to keep the list and the collection syncronized. The listview control has method(s?) one can use to sort it, collections not (?).

The ability to sort the list would be great even at the cost of having to refer to list item subitems with indexes. (lstName.Items.Subitems(index).

Question is: If I choose to forget the structure collection and hold my information only in the listview control am I sacrificing performance or limiting the options I have to work with the data.



Private Function DeleteTypeConversion()

Dim FoundSelectedIndex As Integer
Dim NoItemSelected As Boolean
Dim item As New ListViewItem()
For Each item In lstTcfEntry.Items

' is this item selected?
If item.Selected = True Then
FoundSelectedIndex = item.Index
NoItemSelected = False
Exit For
NoItemSelected = True
End If

' Has a listbox entry been selected?
If lstTcfEntry.SelectedItems.Count >= 1 Then

' ask the user...
If MessageBox.Show("Are you sure you want to Delete/Replace " & _
item.Text & "?", "Delete/Replace Component", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) _
= DialogResult.Yes Then

' store the component that we want to delete...
Dim removeTypeConversion As TypeConversion = _typeConversions(FoundSelectedIndex)

' remove it from the arraylist...

'remove from listview control...
If Not NoItemSelected Then lstTcfEntry.Items.Remove(item)

' If Sub is not called from replace clear the text boxes...
If Not ReplaceActive Then
txtInTypeTcf.Text = ""
txtAngleTcf.Text = ""
txtOutTypeTcf.Text = ""
End If

End If

MessageBox.Show("You must select a valid Electronic Component" & vbCrLf & _
"from the list box", "Select Component Please")

End If

End Function

How Much Faster Would U Reakon Direct Draw Is Compared To Bitblt?
how much faster would u reakon direct draw is compared to bitblt? eg twice, three times, 10 times?

Im trying to get an idea on how much I will speed up my program.

Using System Date
I would like to be able to pull the date off the computers system into a Vb program is this possible and if so how do you do it any help would be greatly appreciated

System Date
can any one here tell me how to get the system date from windows. I am creating a text file in one of my programs and I want the name of the file to include the date. So any help would be appreciated.

Get System Date?

I was wondering if there is a quick way to get the system date, then compare it to see if it is still before August 1, 2002?

System Date
How do I read the system date and after a specified number of days, make something happen. Such as, I'm making an alarm program to remind myself to do certain things. I want a MsgBox every 10,20,500 etc. days. How do I do this? I want to have a text box for the number to input, and every whatever the number of days is, I want the msgbox at that point.

System Date?
Just wondering, whats the value that VB uses to store the current system date? For instance, if i want a label to display the current system date always, it would be Label1.caption = ?????????

System Date
Hello experts,

I'm writing a program with VB5/Access 97 and was wondering if there is a simple way to force all users to use one central system date rather than the date they have on their local windows system.

Any held would be greatly appreciated.



VB6 And US Date System
I'm making a little app....the user is asked to insert a date in a text box in which it's already dispayed the current day using Now function.
I'm in Italy so here I get : dd/mm/yyyy

I was wondering if the software is used in the US the date displayed will change format to mm/dd/yyyy or not.

To Get System Date
Hello friends,

I am writing one program in vb6 and access in which I want to manipulate a record depending on the system date. e.g. of current date is matching with course end date of the student, i want to transfer record of that student to another table which stores record of the records of students who has finished course. but now my doubt is that if u compate it using date function of vb and if someone changes date of the system, it will not work properly, is there any other way to do the same? I don't want my data to lost if someone by mistake do the same? plz help


System Date
does anyone have any idea on how to make a label display the system month on the form_load event

i need it to display it as text rarther than a number

for example January

How To Get System Date In Vb

how to get the system date in vb?


System Date
Hi All,

I am using system date in my application. My system Date and Access date format is same (mm/dd/yyyy).

But when i change my system date the comparison of the system date with the database date is differing.

How can i solve this?
Is not good to use system date?


Nagendra K.

System Date
Hi guys, yes it's me again with some stupid question.

Now don't laught until I'm finished.

I want to know how to see if someone changed the system date. The reason for this is I want to put a sort of limit on my software so that users can only use it for a certain period just like trail version sofware. And then the user must contact me to give him a key after he paid for the software so that he can use my sofware again for a cetain period.

Now there must be alot of examples out there and I was wondering if someone could help me with this because I don't want to reinvent the weel again.

Thanks in advance

Fix The System Date
is it possible to code that someone can never change the system date.
Say I can fix it to 10 june 2002. at present I have nt server and any one having admin password can change it.

System Date
hi, does nayonw know how to change the system date *format*?
like D/M/YY to DD/MM/YYYY? does any one know?

Getting The System Date
HI ,
I am using an SQL query in Crystal reports .. The query is based on date.. Currently the date is hardcoded .. is there a way to specify the current date withing the query in Crystal so that the Query gets the date from System ...


Set The System Date
Does anyone remember the "set date to" in foxpro?

with this sentece you set your app to use the date format you want.

My Q is: How can i do that in VB6?

Set System Date In VB6
Hey Guys,

Can someone point me to a good VB6 syntax reference guide? I need help with the Time function, specifically setting the system time.

How To Set System Date ?
Dear All:

does anyone know if there is built in funtion/external function to set the System Date, without leaving VB ?

System Date In EVB

Is there any way to display the system date in my project(eVB)~!~!
any solution for this??

Copyright 2005-08, All rights reserved