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




Save Date Of Key-in Data Using Date()


 how to make date that data key-in to still reamin at that date?
i mean if i add new data yesterday, field hold yesterday's date. and when i add new date today, last date that i add data still yesterday date..... using Date()... need to put '#' ? like this #date()#?


sorry ..not good in english




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Save Data To Ini Using Date
Hi,

I was wanting to save data to an ini/text file with the name of the file being the date value of DTPicker. any ideas would be appreciated.

Regards

David



Edited by - dgraham on 4/7/2004 4:53:58 AM

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

I Need To Access Date From A Data Base And Manipulate The Date Once I Get It.
I created a program using perl that can preform some basic math on some user entered data. The program uses other numeric data to preform calculations on the user data. The problem is that from time to time non computer users will need to change the numeric data that effects the user input data. I would like them to be able to make the changes and have the program store the changes as variables to work on the user input with. They may update an excel file for instance then the numbers in the fields could be imported to be used by the program to operate on the user input data. Does anyone have a clue if I can accomplish this using Visual Basic 6?

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?

Every Record Has A Date Field. I Want To Find A Date And From This Date, I Want To Read Records To E
Every record has a date field. I want to find a date and from this date, I want to read records to eof. What is the code? - Thanks

How To Get The Date Out Of A Date Data Type?
Hi, I know the question looks stupid, but I really don't know the magic in this:
I have
a date dt =#2003/12/11 23:12:10# and a d=#2003/12/11#
I want to compare the date part (ie without the time part) in a simple way, ( there should be!).
I have to deal with large logs of data so I cannot spend more than two lines for that.
Can anyone help me?
Thanks very much.

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.

Save Date
How can I store null date in a field which is of type datetime ?
I've tried rs("applyDate") = "", it didn't work !!!

How To Save Date?
I have a field which is used to store the date of birth of the user.
It looks like "__/__/___"(dd/mm/yyyy) in the form. I used masked edit to do that.

In the database I define the date of birth as type of datetime.
How can I save the date ?
i.e. rs("birthDate")=txtBirth ---&gt; It doesn't work. Error generated

Thx

Save As (Today's Date)
Hi, I'm trying to write a code that will open up a file and save it as today's date. ex.) (290703.txt). This needs to be done daily. Is there anyway that I can get the filename in the save as line to equal today's date. I was thinking of using a variable somehow but I'm not too sure how to do this, or if that is possible? Thanks!!

Save The Date && Time
I am trying to save the date & time into a table in SQL. I am using the datetimepicker control of VB. But, by using this I can save either the date or the time .. not both at a time. How do I store both using a control & in only one column of SQL table.

Save Date In Databse
Hi Everybody!!!!!

i am using msaccess as backend and vb6.0 as frontend.
my query is, when i m saving date in mm/dd/yyyy format but it has takes dd/mm/yyyy format in table.

how can i change it?

Filename With Date Save
Is there a way to save a filename with the current date in the filename?
I would like to keep a generic title in front (or behind) the date extension..
i.e. New File092703.xls or 092703New File.xls or whatever date format I could use.

Thanks

If I'm not back in five minutes... ...Just wait longer!!!!
   -Ace Ventura

Save Date In .INI File
kindly help.all i want here is to save the first date so that the next load it
will read DATEDIFF then subtract the 1st date and 2nd date. but what happen here
it always read the current date so the outcome is always zero(0).how can i save the 1st date
without changing it from the current date everytime it loaded so it counts the difference?

file = App.Path & "Valid.ini"

If sHsUserNameValue = "" Then

   lbAppName = "Set"
   sHsUserStart = "Start"
   sHsUserValue = Date
   lpFileName = file
   
   
   status1 = WritePrivateProfileString(lbAppName, sHsUserStart, sHsUserValue, lpFileName)

End If

       
 If sHsUserValue <> "" Then
 
   stdiff = DateDiff("d", sHsUserValue, Date)
   lblAppname = "Set"
   sHsDatetext = "Current Date"
   sHsDataDate = Date
   sHsDateUsed = "TimesUsed"
   sHsTimesUsed = stdiff
   lpFileName = file
   
   status1 = WritePrivateProfileString(lbAppName, sHsDatetext, sHsDataDate, lpFileName)
   status2 = WritePrivateProfileString(lbAppName, sHsDateUsed, sHsTimesUsed, lpFileName)
     


End If

If sHsTimesUsed >= 10 Then
   frmSerial.cmdRead.Enabled = False
End If



Edited by - edd_hills on 5/2/2007 2:01:42 AM

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.

Save File As Date And Time
i need to save excel file according to current date and time. i usually use this code:

oBook.SaveAs "C:data1.xls"

each time i need to save a new data, it will overwrite the old one. so, i really hope i could save the worksheet by date and time.

Save As Excel Today's Date
Using Excel VBA 2003 How do I save as todays date in the P:/security/ drive and close the application after clicking on a command button.

Thanks

VBA Function To Capture Last Save Date
I'm trying to code a few lines that capture the file's last save date and stores it in a worksheet cell. I'm storing the code as a workbook open event, however, it fails to compile. Please advise. I have included the code below. Thanks!

Private Sub Workbook_Open()
Range("'Summary_Report'!A32").Value = FileDateTime("Projects")
End Sub

Save File As Date/Time??
In my code I'm using this line to save my file:

oWS.SaveAs "C:Test" & Format(Date, "MM_DD_YYYY")

Can you add a time argument to this as well?

Something like:

oWS.SaveAs "C:Test" & Format(Date, "MM_DD_YYYY") _
& Format(Time, "HH_MM")

Save File As A Name With Yesterday's Date
I am trying to save my workbook as "C5_Macrorun_yesterdaydate" format.

I used the following code [vb]

Range("D1").Select
ActiveCell.FormulaR1C1 = "=TODAY()-1"
Range("D1").Select
ActiveWorkbook.SaveAs FileName:=Range("D1")

However, it turned out to be a number 38012 instead of a date. Plus, I don't know how to name the workbook into a name with combination of text and date. Is there anyway to achieve this idea?

Many thanks for help.

Save Text File With Date.
Hi Guys,

I have a text file which records daily alarms from an applet, i have read msdn and other help files and cannot find how to save this txt file with the date and archive it whilst starting a new file each day.

My code is like this:

Open C:alarm.txt for append as #1
print #1, (alarm text)
close #1

now i want to save this txt file with todays date to an archive folder and tommorow the above code will open a new file.

please help.

Problem To Save Date Into Database
Hi there.. I want to know how to save a null string into a field with a date format. I tried to save it using this code but errors still occur.


VB Code:
txtdate = ""rec.Fields("Date").value = txtDaterec.Update


I want the date field can accept zero length string. How can I do this?

How To Save Date Picker Value Into Access Using SQL
How to Save Date Picker Value into Access Using SQL

before that am using following Code

VB Code:
SQL = SQL & "'" & [b]CDate[/b](MDIchild3.txtshipdate) & "','" & CDate(MDIchild3.txtshiptime) & "','" & MDIchild3.cboshipday.Text & "',"


am getting Error at Bold Cdate
Error Method or Data Member Not Found

thanks

Save File With Date Stamp
Hi guys,

I'm using the OutputTo function to save a report out of Access and need to save the name with a number and the current date stamp plus in this format "mm-dd-yy.rtf". Here's my OutputTo line that I'm using:


VB Code:
DoCmd.OutputTo acOutputReport, "My_View", acFormatRTF, "c:Test205.rtf", True


So I need my filename to be 0205-MM-DD-YY.rtf. My brain is fried for today and I can't figure this out. Thanks!

Excel - Need To Find Date/Time Of Last Save
Hi,

I am trying to get the time/date of the last time a spreadsheet was saved.

I have tried ActiveWorkBook.BuiltInProperties(12) but I am getting an OLE automation error message.

Thanks for any help.

BR

How To Save The Command, Date And Time In A File???
Hello,

I have added a command btn on 1 form whenever i click this command btn it should send a command through serial port and i should store the command whichever i send in 1 file (i.e the command should be stored in such a way that along with command it should show current date and time.)
every time it should update the commands. i.e today on 22nd u have sent 1 or2 commands then those commands should get stored in 1 file along with time and date.
On tomorrow on 23rd if u send some more commands then it should store along with the same date.
For a particular command it should store with a particular date and time it should not get changed.
Please some body help me......

Thanks in Advance
Prity

Save Word Document As Textbox Text And Date?
How can I save a word document as text from a textbox and todays date automatically and without getting messages then close MS Word.

Let's say textbox1.text has number 1 in it, when I click on a commandbutton1 it closes the document as 1_12-17-03.

I use VBA.

Thank you very much.

How To Save A Text File With Date And Time As Filename
Hi, Plz help me out.

How to save a text file with date and time as filename.

My code is:
dt = Date
tt = Time
 intFile = FreeFile()
        Open App.Path & "" & dt & tt &.txt" For Output As #intFile
        Write #intFile, sometext
        Close #intFile

But it is not working.

Thanks in advance

Insert Date And Time Of Picture Creation And Save The Image
Please help me to insert the string to JPEG using vb6. I need to insert the time of picture taken or anyother string in all my pictures

Archive PPT-Save A Copy With Todays Date, If Doesnt Exist Already
I want to make a macro that will check a certain directory for a file with a filename like:

Presentation-20-09-2007.ppt

If the file for todays date doesnt exist, it saves the current presentaion with the proper date in the filename.

Is that possible?

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 ?

Setting Long - Short Date Format In Date Time Settings
How can i set the Date Time Setting Format in Control Panel

i m usiing window Xp


also i want the date format in dd/MM/yyyy

Pls Answer Me, How Can I SET To Long Date Fomat The Date Settings In Regional Setting
Pls answer me, how can i SET to long date fomat the date settings in regional settings? i want that when my form loads, it automatically change the date settings in the regional settings to long date format

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

Resolved -How Do I Get Tomorrows Date From Todays Date And Put It In Access An Query?
I figured this much out in VB but it returns a string. So how can I put in a Access query tomorrows date? I also want to do a report that is for the week. Do Date$ = 7 days... Any ideas on how I should do this?

Str(Month(Date$)) + "/" + Str(Day(Date$) + 1) + "/" + Str(Year(Date$))

Date Time Picker &gt;&gt; Fuction To Calculate A Specific Date
I have two Date Time Picker controls.

What needs to happen is when user selects a date in DTPicker1 then a date 7 months later, on the following tuesday is displayed in DTPicker2.

Any help with this would be great.

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.

Save Text/date To A Variable In Afterupdate Setup Tool (Access)
In Access I am trying to transfer the date of the last record created to automatically be input into the next record to be created. I think I have to put some sort of line of code in the afterupdate event to equal the date and place it in the next record beforeupdate event? Could you help me?

CommonDialog Open/Save --Need To Show Details And Sort By Modify Date
Hi,

I am using a common dialog to retrieve a filename from a directory, to make the job simpler for users I want to sort by the modified date so that the most recently created file goes to the top of the list. I assume I would also need to show the details of the files to do this????


Tim.

Copyright © 2005-08 www.BigResource.com, All rights reserved