Expiry Date....help!
Hi can anybody help me.. I'm trying to take a date from a text file, put it into a variable varExpiryDate, and compare the ExpiryDate with the varDateNow variable..
If varDateNow >= varExpiryDate Then MsgBox "This Program has reached the end of its time limit." End End If
the previous code works if I manually put in the date instead of the variable varExpiryDate, #12/4/00#
The code to find the date is something like this
If InStr(TextLine, 1) = #12/5/00# Then varExpiryDate = #12/5/00# Call TimeLimit End If
the date in the text file is written 12/5/00
if anyone can help I would be most grateful. cheers skat
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Expiry Date
- Expiry Date
- Creating Expiry Date
- How To Set Expiry Date Of Application
- Expiry Date On Application
- Simple Database With Expiry Date
- System Date && License Expiry
- Setting Expiry Date For VB Software
- Message Box To Capture List Of Expiry Date
- Data Validation For Expiry Date And Email Address
- Software Licence Expiry Date / Adjusting Windows Time
- Program Expiry
- How To Check If A Password Has Expiry...
- Trial Program Expiry
- Expiry Module Not Functioning
- Time Limit && Program Expiry
- How To Write A Expiry Counter Code In VB
- Dategood Function && Time Expiry Program
- DATE Problems - Change Date Format To European, Get Current Date, Subtract 2 Dates?
- DATE Problems - Change Date Format To European, Get Current Date, Subtract 2 Dates?
- Every Record Has A Date Field. I Want To Find A Date And From This Date, I Want To Read Records To E
- DATE Problem - Formatting US Date MM/DD/YY To European Date Format DD/MM/YY
- Query With Date Ranges And Return Only Closest Date To 'to Date'
- DATE Problem - Formatting US Date MM/DD/YY To European Date Format DD/MM/YY
- Grouping By Date Where Date Field Is Date/time
- Return The Date Before And The Date After The Date Entered
- File Information Get Path ,filename,filesize,access Date ,modified Date
- Date Picker Control Doesn't Show Current Date In Field
- Setting Long - Short Date Format In Date Time Settings
- Pls Answer Me, How Can I SET To Long Date Fomat The Date Settings In Regional Setting
- Data Is Coming Correctly In Report, But Date In The Date Header Is Not Refreshing Help Pls
- Checking For Date In Access File And Compairing It To Todays Date...
- Date Conversion As Oracle Database Date Default Format
- Resolved -How Do I Get Tomorrows Date From Todays Date And Put It In Access An Query?
- Date Time Picker >> Fuction To Calculate A Specific Date
- Date Format, Count No. Of Days & Highlight Date In Calendar
- Date Time Picker Control: How Do Set The Displayed Date To Null?
- Using The DATE To Transmit 2 Days Ahead Of Current Date (RESOLVED Thank You)
- How To Use DTPicker For Start Date - End Date Queries For Generating Reports.
- Date && Time Values In Date And String Format Differ
- Date Created No Prob, Date Updated Big Headache
- Make VBA Read Date In Cell Which Contains Date && Text
- [SOLVE]I Need A SQL Command, How To Use Date Minus With System Date Know Its Last..
- How To Subtract 12 Date And Then Delete All The File Match The Date
- Still Having Probs With Select Statement Where Date = Todays Date
- Check If Today's Date Is X Days Past Another Date
- Making Sure The User Enters A Date In Date Format
- Quetion On Correct Code For Start Date To End Date
- Is There Any Date Function In VB6 To Subtract 3 Months From Current Date?
Expiry Date
Hi all,
I would like to check a date input against the current date + #months/days
how do i access the current date through vb ??
and could someone point me in the right direction of adding #months/days to the date and then validating against date input...
TIA.
Osk.
Expiry Date
Ok. I've made a program that stores all it's top secret information in the tempory file folder during runtime. When the program finishes executing, that file is deleted. Now here's my problem:
Suppose windows crashes or something and the program is not been able to shut down properly. Then the file remains in the temp directory. Is there anyway to overcome this problem. I heard that there is something called expiry dates for tempory files. Like in a certain number of days the file deletes itself or something like that. Is there some way to set the expiry date.
Thanks
Expiry Date On Application
I just completed my first application using VB (access db), and I am ready for the clients to test it. However, I would like to put an expiry date on it and am not sure how to go about this, or if it is even possible. Essentially we have set the test period for 4 weeks, and after that, if they are happy with the prototype developed, then we will move to the next phase of development. We, therefore don't want them to be able to continue using the "prototype" instead of purchasing the final product, but we don't want to lose their data either (they need to be able to take their data with them even if they don't take the product). They will be installing the setup on their system, and the db will be located on their server as well.
Any help will be appreciated!
Thankx, Addie
Simple Database With Expiry Date
how to create this one..
we have 1 text box for name, 1 text box for registered date and 1 text box for expiry date
example: you register Your Name:
e.g
John Volt
DATE REGISTERED: 09/24/06
EXPIRY DATE: 09/31/06
after the date of expirty delete the john volt record..
System Date && License Expiry
When a user enters a license key into my software, the key generates a date (which is stored in the registry), when the software "license" will expire. Obviously by altering the system date and time renders my license just about useless in terms of "licensing".
The users that will be using the software are quite experienced but not enough to go through the registry. Does anyone have any advice to lend concerning what I could do to maybe stop people tampering.
The OS it is running on is Windows 98, if it was Win 2000 I would have probably just not given them any rights to the clock.
Regards and Thanks in advance!
Matt.
Setting Expiry Date For VB Software
Any one pls let me know, How to set the expiry date for a VB software.I've developped one software using VB,and want to distribute the evaluation copy which should work for only one week.first i thought to set the date(from system date) in one encrypted hidden file ,which would become useless when the user deletes that file.so any one pls help me to set the details in registry or ini file...
Thanks in advance.
Message Box To Capture List Of Expiry Date
Dear all,
I have 3 worksheets representing product A, B and C to monitor the expiry dates of each product. All these worksheets have same format with column A for Product Code and column B for Expiry Date. The expiry dates are sorted in ascending order.
My requirement are:
1) A message box will remind me with product code if it is going to expire within 7 days.
2) After the prompt message of each expired products, I would like to have a final message box which list down all the expired products from worksheet 1, 2 and 3.
My problem lies on the second requirment which sees it captures product codes from worksheet 1 i.e. Product A only and leaves out other worksheets. Appreciate for your assistance to review the below codes. Thank you.
Private Sub Workbook_Open()
Dim LRow As Integer
Dim LResponse As Integer
Dim LName As String
Dim LDiff As Integer
Dim LDays As Integer
Dim ref(5) As Variant, refdate(5) As Variant, c As Integer, i As Integer, refmsg As String
c = 0
LRow = 2
LDays = 7
refmsg = "Referenceate Due" & vbCrLf
While LRow < 200
'Check Product A
If Len(Sheets("Product A").Range("B" & LRow).Value) > 0 Then
LDiff = DateDiff("d", Date, Sheets("Product A").Range("B" & LRow).Value)
If (LDiff >= 0) And (LDiff <= LDays) Then
ref(c) = Range("B" & LRow).Offset(0, -1).Value
refdate(c) = Format(Range("B" & LRow).Value, "dd/mm/yyyy")
c = c + 1
LName = Sheets("Product A").Range("A" & LRow).Value
LResponse = MsgBox("The AW Reference No. for " & LName & " will due on " & LDiff & " days.", vbCritical, "Warning")
End If
End If
'Check Product B
If Len(Sheets("Product B").Range("B" & LRow).Value) > 0 Then
LDiff = DateDiff("d", Date, Sheets("Product B").Range("B" & LRow).Value)
If (LDiff >= 0) And (LDiff <= LDays) Then
LName = Sheets("Product B").Range("A" & LRow).Value
LResponse = MsgBox("The BW Reference No. for " & LName & " will due on " & LDiff & " days.", vbCritical, "Warning")
End If
End If
'Check Product C
If Len(Sheets("Product C").Range("B" & LRow).Value) > 0 Then
LDiff = DateDiff("d", Date, Sheets("Product C").Range("B" & LRow).Value)
If (LDiff >= 0) And (LDiff <= LDays) Then
LName = Sheets("Product C").Range("A" & LRow).Value
LResponse = MsgBox("The CW Reference No. for " & LName & " will due on " & LDiff & " days.", vbCritical, "Warning")
End If
End If
LRow = LRow + 1
Wend
'-------------------------------------------------------------------
For i = 0 To c - 1
refmsg = refmsg & ref(i) & ":" & refdate(i) & vbCrLf
Next i
MsgBox refmsg, vbOKOnly, "Expiry Dates"
'PROBLEM : The msgbox captures data from worksheet "Product A" only.
'-------------------------------------------------------------------
End Sub
Data Validation For Expiry Date And Email Address
How do I create a data validation to an expiry date for a credit card number?
For example, I need a code so that a value of only 1-12 is acceptable for the
month and 05 (or greater than) for the year. how do i assign these codes to a command button so that when the button is pressed, the customer is informed about wether the code is correct or not.
Lastly, how do i create a data validation for an email address so that the '@' symbol is entered
Software Licence Expiry Date / Adjusting Windows Time
We have produced a small licence activation bolt on for a our software, which allows the user to activate their copy of the software. After confirming activation with us it logs the activation date on the local machine. This is then used to calculate when the software should expire.
We will know when the time is up and our central system will reinvoice the client. However, we can't stop the client cancelling the subscription and adjusting the Windows time to keep the software running.
We have considered using the BIOS date rather than the Windows date, however we came accross problems coding this (nasty code), besides the BIOS time is not always correct!!
I have some ideas for how to at least detect if the client has changed the time, but wondered if there was an excepted solution to this problem. I can't find anything out there, and am sure that we are not the first people to want to do this!!
Any ideas would be gratefully received...
Program Expiry
Now, i checked the past posts on this, but i didn't understand them. Can somebody please tell me how to make a program expire at the end of the month. If someone could post an example of how to do it, with some code, i would really appreciate it, cz i don't know how to do most things, e.g. make registry entries
Trial Program Expiry
What is the best way to make a 15-day demo?
Yes I've used the "search" button. But the codes that I found are not fool-proof.
My current method is to store the encrypted installation date in the registry. And whenever user opens the program, use the DateDiff function to see if it is over 15 days from the date of installation.
Apparently, that method has many holes.
1. I can change my comp date to something like "1/Jan/2337" before installing the program. After installaion, I change it back to year 2007. I will be able to use the demo program forever.
2. I can roll back to the installation date and keep using the demo forever..
How to prevent these?
Expiry Module Not Functioning
I use a very simple system for controlling the expiration date of trial versions of my software - a .bas file containing just the following code:
Attribute VB_Name = "Expiry"
Public Sub Main()
If Format(Now, "mm/dd/yyyy") < "12/31/2004" Then
frmMain.Visible = True
Else:
frmExpire.Show
Exit Sub
End If
End Sub
I've been using this method for a long time and everything has been fine. Now when I change the date to anything in 2005, however, it no longer works and the software is treated as though it's already expired.
Any ideas what could be causing this aberrant result?
Thanks very much and Happy New Year!
Stephen
Time Limit && Program Expiry
Hi Gurus,
I want to do some test or some experience:
After finish developing a program, I want to set up a "time limit" for USER(s) to use it. For example, I want to set one year time limit for user to use it, this means, after one year, the program will expire, where should I write the code? and what kind of code should I write?
Thanks.
How To Write A Expiry Counter Code In VB
I have a VB program which wants to add an expiry counter code in it. This expiry counter is to count the date which the program is installed for the customer, if the program has used for 30 days, a message will pop up saying that the program is already expired.
I don't know how to write the code for this date counter. Please help ASAP. Thanks!
Dategood Function && Time Expiry Program
Hi,
I'm using an extract of code posted on this site, written by Sir Reginald Wheat. It uses the DateGood function.
The code I copied has DateGood(30) - that is, the app will expire after thirty days.
Is DateGood workable up to any number of days? I mean I want my program to expire after a year, DateGood(365), so I just want to know of any limitations on the DateGood function.
Thanks.
DATE Problems - Change Date Format To European, Get Current Date, Subtract 2 Dates?
Need someone to point me in the right direction/start me off with this please as I am quite clueless on it at present...
I need something that can successfully subtract two dates...
eg. calculate the difference between the current date
02/04/04 (2nd April 04) and 29/03/04 (28th March 04)
...
which will then output a result of 5 days
So what I need to know is...
1.
I need to know how to get the current date from the system clock
2.
I must somehow get my date function converted into European date format (as at present it is in USA format ie. 2nd April 04 is 04/02/04 like April 2nd 04 which is not good!)
3.
and then I must actually SUBTRACT the 2 dates (the current date and a date that is given) from each other to give an integer which I can then use (ie. a value like 5 or 15).
But I have little idea how to go about this
Can anyone please start me off?
DATE Problems - Change Date Format To European, Get Current Date, Subtract 2 Dates?
Need someone to point me in the right direction/start me off with this please as I am quite clueless on it at present...
I need something that can successfully subtract two dates...
eg. calculate the difference between the current date
02/04/04 (2nd April 04) and 29/03/04 (28th March 04)
...
which will then output a result of 5 days
So what I need to know is...
1.
I need to know how to get the current date from the system clock
2.
I must somehow get my date function converted into European date format (as at present it is in USA format ie. 2nd April 04 is 04/02/04 like April 2nd 04 which is not good!)
3.
and then I must actually SUBTRACT the 2 dates (the current date and a date that is given) from each other to give an integer which I can then use (ie. a value like 5 or 15).
But I have little idea how to go about this
Can anyone please start me off?
DATE Problem - Formatting US Date MM/DD/YY To European Date Format DD/MM/YY
I have a problem whereby the user must enter a date into a field...
The system changes the date format to US standard which is MM/DD/YY
but I need to change the format to DD/MM/YY (European standard)
I have done this using the Format function, but I still have a slight problem
Format(mydate,"dd/mm/yy")
doesnt account for all dates...
for example...
if I enter 31/03/04 this is fine, it will accept it as that
However, if I enter 02/04/04 (todays date - 2nd April 04), it will change it to 04/02/04
Any ideas how I can counter this from happening?
Query With Date Ranges And Return Only Closest Date To 'to Date'
I am using an access db...
I am trying to pull back due dates for credit reports for clients. I have 4 tables I am working with for this query...
[Client_info]
[Dispute_track_eq]
[Dispute_track_exp]
[Dispute_track_trans]
[Client_info] has the basic client information....ID, SSN, name, telephone_numbers, yadd yadda..
each of the other tables hold the fields I am pulling from(other fields as well but these are the ones i need)...
[Dispute_track_eq].eq_due_date
[Dispute_track_exp].exp_due_date
[Dispute_track_trans].trans_due_date
Here is my problem...
I have variable that are set by dtpickers...'from_date' and 'to_date'. I am trying to get back each of these due dates that fall between the ranges set along with the [client_info] data linked by the SSN field. The problem is that sometimes these clients will have multiple due_dates(multiple rows) between the range. What the end result needs to be is this, I need to only have one record to come back with one of each due_date from each table, but only give me back the closest due_date to the 'to_date'(set by dtpicker) as well as the data from the [Client_info] table. And if there are no records for one or two but not the thirs field, an empty fields is ok(using a datagrid). But I can only pull back one row with the [client_info] fields, and one of each of the 3 due date fields. I have a query already but it doesnt even come close to working, it gives me many duplicates and doesnt give me the closest due_date to the 'to_date'.
Here is my query, but it doesnt work. Any help would be greatly appreciated, I am in dire need of help on this one.
Code:Private Sub Command4_Click() '***Due dates report grid date
to_date = dt2.Value
from_date = dt1.Value
If from_date = vbNull Then
MsgBox "Please select a FROM DATE"
Exit Sub
ElseIf to_date = vbNull Then
MsgBox "Please select a TO DATE"
Exit Sub
Else
Dim ID_new As String
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
Dim ID_pass As String
Dim active As String
active = "Active-Negotiations"
Set rs = New ADODB.Recordset
strSQL = "Select" & vbNewLine
strSQL = strSQL & " [client_info].[FirstName], [client_info].[LastName], [client_info].[HomePhone], [client_info].[MobilePhone], [client_info].[Client_status], [client_info].[Category], [client_info].[Appt_notes],[client_info].[Appt_date],[client_info].[Appt_date_time], " & vbNewLine
strSQL = strSQL & " [dispute_track_eq].[eq_due_date], [dispute_track_exp].[exp_due_date], [dispute_track_trans].[trans_due_date]" & vbNewLine
strSQL = strSQL & " FROM (dispute_track_exp INNER JOIN (dispute_track_eq INNER JOIN client_info ON [dispute_track_eq].[SSN] =[client_info].[SSN]) ON [dispute_track_exp].[SSN] =[client_info].[SSN]) INNER JOIN" & vbNewLine
strSQL = strSQL & " dispute_track_trans ON [client_info].[SSN] =[dispute_track_trans].[SSN]" & vbNewLine
strSQL = strSQL & " Where (dispute_track_trans.trans_due_date > #" & from_date & "# And" & vbNewLine
strSQL = strSQL & " dispute_track_trans.trans_due_date < #" & to_date & "#)" & vbNewLine
strSQL = strSQL & " OR (dispute_track_eq.eq_due_date > #" & from_date & "# And" & vbNewLine
strSQL = strSQL & " dispute_track_eq.eq_due_date < #" & to_date & "#)" & vbNewLine
strSQL = strSQL & " OR (dispute_track_exp.exp_due_date > #" & from_date & "# And" & vbNewLine
strSQL = strSQL & " dispute_track_exp.exp_due_date < #" & to_date & "#) AND NOT NULL"
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source= " & db & " "
.open
End With
Set rs = New ADODB.Recordset
With rs
.ActiveConnection = cn
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Source = strSQL
.open
End With
If rs.RecordCount = 0 Then
MsgBox "Sorry, no one matched that status, try again", vbOKOnly, "Credit Matrix"
Set DataGrid1.DataSource = rs
Else
Set DataGrid1.DataSource = rs
End If
End If
I would be forever in your debt for helping me as I am almost out of hair....FROM PULLING IT OUT!!
Edited by - ronmegga on 4/1/2004 5:26:03 PM
DATE Problem - Formatting US Date MM/DD/YY To European Date Format DD/MM/YY
I have a problem whereby the user must enter a date into a field...
The system changes the date format to US standard which is MM/DD/YY
but I need to change the format to DD/MM/YY (European standard)
I have done this using the Format function, but I still have a slight problem
Format(mydate,"dd/mm/yy")
doesnt account for all dates...
for example...
if I enter 31/03/04 this is fine, it will accept it as that
However, if I enter 02/04/04 (todays date - 2nd April 04), it will change it to 04/02/04
Any ideas how I can counter this from happening?
Grouping By Date Where Date Field Is Date/time
I have an SQL7 database storing datetime data, and totaliser reading, new records are added every 5 minutes.
I have written the following sql to give me the the min and max totaliser reading for each day - which works fine - except that the resultant Date field is a text field not a date field so the order statement generates an incorrect listing if the data selected sarts in one month and ends in the next, eg.
select left(Date, 12) as Date, Min(Reading) as Day_Start, Max(Reading) as Day_End from Steam where tag_no = 2 and (Date <= '24-November-2005 00:00:00' and Date >= '22-October-2005 00:00:00') Group By left(Date, 12) order by Date asc
Is there another function I can use to extract just the date from the date/time field as a date data type?
I cannot alter the database as its structure is predetermined by the remote field device supplying the data.
Return The Date Before And The Date After The Date Entered
I have a table of Required Dates that contains: TransNo; OrderNumber; RequiredDate.
What I want to do is returned the Record with the Date before and the date on/after the date I specify for each Order Number.
i.e.
TNo; OrdNo; Date;
001; 19002; 01/03/2004
002; 19002; 20/03/2004
003; 19002; 29/03/2004
004; 19002; 01/04/2004
005; 19004; 11/03/2004
006; 19004; 20/03/2004
007; 19004; 29/03/2004
008; 19012; 05/03/2004
009; 19012; 11/04/2004
010; 19012; 19/04/2004
011; 19012; 21/04/2004
Given the above data. If I enter 19/03/2004 I want to return:
001; 19002; 01/03/2004 ' Date before 19/03
002; 19002; 20/03/2004 ' Date After the 19/03
005; 19004; 11/03/2004
006; 19004; 20/03/2004
008; 19012; 05/03/2004
009; 19012; 11/04/2004
I want the SQL statement that will do this.
File Information Get Path ,filename,filesize,access Date ,modified Date
This tiny zip file have filename,filepath,fileaccess date,file modified date
if picture file then size of the picture
Thanks guys
bellow code
-------------------------------------------------------------------
Private Const OF_READ = &H0&
Private Declare Function lOpen Lib "kernel32" Alias "_lopen" (ByVal lpPathName As String, ByVal iReadWrite As Long) As Long
Private Declare Function lclose Lib "kernel32" Alias "_lclose" (ByVal hFile As Long) As Long
Private Declare Function GetFileSize Lib "kernel32" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Dim lpFSHigh As Long
Private fileN As String
Private fileP As String
Private fileS As Double
Private fileC As String
Private fileA As String
Private fileH As Long
Private fileW As Long
Private fileX As String
Dim fs As Scripting.File
Private Sub Command1_Click()
Call commonDialogCall
Call GetFileS(fileX)
Call FileWHget
Call FileDateGet
Call displayall
End Sub
Public Sub displayall()
Label1.AutoSize = True
Label2.AutoSize = True
Label3.AutoSize = True
Label4.AutoSize = True
Label5.AutoSize = True
Label6.AutoSize = True
Label7.AutoSize = True
Label1.Caption = "File name = " & fileN
Label2.Caption = "File path = " & fileP
Label3.Caption = "File size = " & fileS & " Byte"
Label4.Caption = "File Created = " & fileC
Label5.Caption = "File Accessed = " & fileA
Label6.Caption = "File height = " & fileH
Label7.Caption = "File Widht = " & fileW
End Sub
Public Sub commonDialogCall()
CommonDialog1.Filter = "*.bmp"
CommonDialog1.ShowOpen
fileX = CommonDialog1.FileName
fileN = CommonDialog1.FileTitle
fileP = Left(CommonDialog1.FileName, Len(CommonDialog1.FileName) - (Len(CommonDialog1.FileTitle) + 1))
End Sub
Public Sub GetFileS(FilePath As String)
Dim Pointer As Long, sizeofFile As Long
Pointer = lOpen(FilePath, OF_READ)
'size of the file
sizeofFile = GetFileSize(Pointer, lpFSHigh)
fileS = sizeofFile
lclose Pointer
End Sub
Private Sub FileDateGet()
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(fileX)
fileC = f.DateCreated
fileA = f.DateLastModified
End Sub
Private Sub FileWHget()
Dim pic As Picture
Set pic = LoadPicture(fileX)
fileH = pic.Height
fileW = pic.Width
End Sub
Private Sub Command2_Click()
End
End Sub
---------------------------------
Date Picker Control Doesn't Show Current Date In Field
How do I set the display date in the Date Picker control field ? MSDN says that it should return the current date by default, but it only shows the current date highlighted in the drop down calendar.
The control shows the date when the control was created and added to the form.
How do I set the date at form load ?
Code:
dtpicker1.value = ? ' how do I call current date ?
Data Is Coming Correctly In Report, But Date In The Date Header Is Not Refreshing Help Pls
Hai
I am dispalying the report from VB. the data is showing correctly as per the parameter I pass from VB. But the formula box in the PagerHeader in Crystal report , some times misses the correct date and show the previous date (i.e) the previous parameter passed by the user. But the data is shown correctly.
The below is the command button event
Private Sub cmdpPreview_Click()
On Error Resume Next
If optProduct.Value = True Then
Call PCsumListbyValue
ElseIf optItem.Value = True Then
Call optPItemwise
Else
MsgBox "Choose Option !", vbExclamation, "Option - Missing"
End If
End Sub
The below is the code in the function
Private Sub PCsumListbyValue()
CrystalReport1.Formulas(1) = " "
CrystalReport1.Formulas(4) = " "
CrystalReport1.GroupSelectionFormula = " "
pfdt = txtpfrom.Text
ptdt = txtpto.Text
If Len(cmbPprod.Text) <= 0 Or cmbPprod.Text = "All" Then
CrystalReport1.ReportFileName = App.Path & "cstlistvaluewgt.rpt"
strsf = "{Sales.SoldDate} in Date(" & _
Format(pfdt, "YYYY,M,D") & ") to Date(" & _
Format(ptdt, "YYYY,M,D") & ")"
CrystalReport1.ReplaceSelectionFormula (strsf)
CrystalReport1.Formulas(1) = "fdt='" & pfdt & "'"
CrystalReport1.Formulas(4) = "tdt='" & ptdt & "'"
CrystalReport1.DiscardSavedData = True
CrystalReport1.PrintReport
Else
CrystalReport1.ReportFileName = App.Path & "cstlistvalue.rpt"
strsf = "{Sales.SoldDate} in Date(" & _
Format(pfdt, "YYYY,M,D") & ") to Date(" & _
Format(ptdt, "YYYY,M,D") & ")"
CrystalReport1.ReplaceSelectionFormula (strsf)
CrystalReport1.GroupSelectionFormula = "{Sales.Product}='" & cmbPprod.Text & "'"
CrystalReport1.Formulas(1) = "fdt='" & pfdt & "'"
CrystalReport1.Formulas(4) = "tdt='" & ptdt & "'"
CrystalReport1.DiscardSavedData = True
CrystalReport1.PrintReport
End If
End Sub
i tried by ticking the check box in the File menu --> Option --> Reporting Tab --> [Discard Saved Date while loading Report] and also I tried by uncheck the box [Save Date With Repot]. Then also its not working.
I also attached the front view of the form. Kinldy view and reply me.
Thank you very much,
Chock.
Thank you very much,
Chock.
itchocks@rediffmail.com
<HTML>
<B><font color="#008000">HAVE A NICE DAY !</font></B>
<HTML>
Edited by - chs on 5/24/2003 9:51:07 AM
Checking For Date In Access File And Compairing It To Todays Date...
Hey all, i am stuck at this point in my program.
I need the program to load up my access table and check for the date of orders:
each record has a field called PickUp and its formatted like "sat 1/1/2004".
When the form loads up, i need it to check that field and the computers date and if its the same, place the record into the list view. Keep going down the list til EOF.
Any help would be great.
Thanks for your time,
David
Date Conversion As Oracle Database Date Default Format
Select sysdate from dual ; //oracle database
The result is : 28-AUG-04
How to convert “date” in vb to the above format?
Using below statement :
FormatDateTime(Date, vbLongDate) // Saturday, August 28, 2004
Then, combine with string functions (such as instr, left, mid, etc) can be achieved the desired result.
Any shortcut than above mentioned?
Thanks.
vb999
Date Format, Count No. Of Days & Highlight Date In Calendar
<html><div style='background-color:'><DIV>
<P>Hi all,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Happen to visit this website accidentally and found that it’s very useful to VB beginner like me. <SPAN style="mso-spacerun: yes"> </SPAN>I have the following problems and would appreciate your kind assistance to enlighten me.<SPAN style="mso-spacerun: yes"> </SPAN>Attached is my file for your checking.<SPAN style="mso-spacerun: yes"> </SPAN></P></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> <?XML:NAMESPACE PREFIX = O /><O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo3">1)<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN>Sometimes, the number of days is incorrect with a big figure (e.g from 1 to 30 Apr) or even a negative figure after I change the system’s date format from “mm/dd/yyyy” to “dd/mm/yyyy”.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"> <O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo3">2)<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN>In calculating the number of days, I need to exclude Sunday.<SPAN style="mso-spacerun: yes"> </SPAN>By using the “WeekDay (Calendar1) = 7 “ method, I still didn’t get the correct result.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> </P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><O:P> 3) How to highlight a certain date in calendar with different colour to indicate it's a public holiday ? </O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><O:P></O:P> </P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Many thanks in advance.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> <O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Best regards,</P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">YC </P>
<DIV></DIV>
<DIV></DIV>
<P><BR><BR></P>
<DIV></DIV>
<DIV></DIV></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMVEN/2746">MSN 8.</a> Get 2 months FREE*.</html>
Date Time Picker Control: How Do Set The Displayed Date To Null?
I have a front end database form with date fields using the MS dtp control. The fields are unbound, but populated using a data class. The problem is that on many occasions the date field is Null, ie no data available. On display the dtp control always defaults to a set date, usually today (this is a property function of the control). What I can't seem to do is to display no date, or to delete the date displayed. Any thoughts would be very gratefully recieved. API perhaps?
I'm trying very hard not to have to write an Active-X control based on the dtp (mainly because of multilingual support and different localisation issues regarding dd/mm/yyyy (used by 90% of the world's population, and mm/dd/yyy - used by the remaining 10% in the US - sorry just had to get that jibe in for those of us who despair at having to go in to custom formatting in Excel simply to get dd/mm/yy )
Many thanks
Using The DATE To Transmit 2 Days Ahead Of Current Date (RESOLVED Thank You)
It seems simple, ive looked and looked, cannot find it. . .
basically what I need to do is transmit 2 days ahead of current date. . .
IE today is the 14th, I need it to auto transmit it to the 16th.
Its a pend out date on an account, I've got everything auto except for this feature. . . .
If I get in touch with a client, I want the account to automatically pend the account out for 2 days.
Thanks for the help, love the site, look for me more often, and be sure to purchase some of my award winning albums at a christian store near you.
Edited by - Bryan Duncan on 6/15/2004 3:52:58 PM
How To Use DTPicker For Start Date - End Date Queries For Generating Reports.
I am using two DTPicker Controls on my form, one for Start Date and the second one for End Date parameter. On running the project it is giving me errorata type mismatch.I have checked the datatype in my database(MSAccess) as Date. I am using control names in the SQLQuery(ie DTPicker1.Value and DTPicker2.Value) for getting values from the DTPicker Controls.
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.
Date Created No Prob, Date Updated Big Headache
Just today I have used the event like you referred to:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Forms!FormName.Controls!LastUpdate = Now()
...
However, I still have a small problem. The LastUpdate field does not visually update on my form until I leave the record and return. Is there a way to force a visual update, too?
Thanks,
David
Make VBA Read Date In Cell Which Contains Date && Text
VBA 6.3
Excel 2003
Hello,
I need my macro to be able to look at a cell which contains both text and a date, and be able to extract just the date part from it.
Example: cell conents - "COL 16/10/2005"
My macro has to be able to read the date and then paste it in another cell so that a formula in the work sheet will work (that subtracts this date from another).
Thanks in advance,
Henry
How To Subtract 12 Date And Then Delete All The File Match The Date
Hi all,
At the first run on my program, I rename all incoming file within today date. then now my folder start to be full after a while. i mean my output folder is full.
how can i delete a list of file if they are 12 day old?
here is my rename and adding todays date.
thanks for u help in advance.
my output file after renaming looks like : myfilename.txt-07-07-2007
Code:
Private Sub tmrRefresh_Timer()
File1.Refresh
File2.Refresh
Dim i
Dim oldFileName$
Dim filedate$, newFileName$
Dim oldFilePath$
Dim del
Dim newfilename1$
filedate$ = Format$(Now, "dd-mm-yyyy")
For i = 0 To File1.ListCount - 1
oldFileName$ = File1.List(i)
If oldFileName$ <> "Rename1.exe" Then
oldFilePath$ = File1.Path & "" & oldFileName$
newFileName$ = File2.Path & "" & oldFileName$ & "-" & filedate$
If oldFileName$ <> "" Then
FileCopy oldFilePath$, newFileName$
Kill oldFilePath$
End If
End If
File1.Refresh
File2.Refresh
Next i
End Sub
Still Having Probs With Select Statement Where Date = Todays Date
Hi Guys
I am using vb6.0 connecting to a SQL database (runningMSDE)
I am trying to load all contacts where the recontactdate is today
I have tried the following but am getting the error - syntax error converting datetime to character string - please help!
my code -
onload - dtpicker1.value = date
(tblcontacts.dtmrecontactdate is date/time)
Set adoduecallbacks = New Recordset
adoduecallbacks.Open "Select * from tblcontacts where dtmrecontactdate = ' " & DTPicker1.Value & "%" & " ' ", db, adOpenStatic, adLockOptimistic
- Please help!!!
Thanks
Check If Today's Date Is X Days Past Another Date
Hi, I am using Visual Basic 6.0 on Win 2000 environment. I am currently developing a video rental app as a school project. How can I check and see how many days past today's date is from a previously entered date?
For instance, 1- When a customer rents and item, I enter the customer's rental date (let's use 5/20/04 as an example), 2 - Then when the customer returns the item, I enter in the date returned (5/23 - today's date). How can I code this in VB to check for how many days late the item is?
I tried doing this, but nothing happens: (let's assume the variable dateRented is the date that was previously entered when the customer rented the item)
VB Code:
Dim todaysDate As DatetodaysDate = Now If dateRented > todaysDate Then MsgBox "This item is late!"End If
Any suggestions would be great. I appreciate it!
Quetion On Correct Code For Start Date To End Date
hi guys i need to noe the correct coding for me select start date to end date of my database i posted on the database forum but theres only 3 ppl online but i need a fast response so hope you guys could help thanx alot
adodc1.RecordSource="select * from training where trim(course_fm_date)="1/4/1999" to trim(course_fm_date)="31/3/2000"
could u guys tell me what went wrong?? and the correct code...
i really need this.... thanx
|