General :: Converting Strings To Dates?
Sep 18, 2014I am trying to manipulate some Ebay data, which returns a string like "1d 00h 29m"
Is there a function I can use to convert this string to relevant hours in total?
I am trying to manipulate some Ebay data, which returns a string like "1d 00h 29m"
Is there a function I can use to convert this string to relevant hours in total?
hi all,
i'm importaing a table through a mysqlserver, it contains a field (call_time)
and its a long integer, i suppose it's an unix date format that can be converted
into DD:MM:YYYY HH:MM format, only problem is i cant find a way to do it on access
i've tried creating a query with all the fields and adding my one fields with commands such
as valdate([call_time]) but it dosen't seem to work.
can anyone help me please
Thank you
Dear All:
I have creadted a form with a combo box that has 3 dates in it: February 1, 2005, September 1, 2004 and June 4, 2004.
Is there a way to display in another field on the form(A text field) when one of these dates is selected from the combo box, a text field returns "DATED ON THIS FIRST DAY OF FEBRUARY TWO THOUSAND FIVE"?
I reckon this is a vb issue and any help is appreciated.
Thanking in advance
Dion
I am trying to write some VBA to convert a date into a week number.
My work colleagues do not not what system is used to define the week numbers. So I have gone through all their records for a few years and deciphered this pattern:
I need the code to define that there are 52 weeks in a year. The last sunday of Dec is the beginning of Week 1 for the following year. Except when it is a leap year where Week 53 exists. otherwise it only goes up to week 52.
Start day for the week is Sunday. End day is the Saturday.
Some examples to check against:
22nd December 2013 = Week 52 2013
29th December 2013 = Week 1 for 2014
----
21st December 2014 = Week 52 for 2014
28th December 2014 = Week 1 for 2015
----
20th December 2015 = Week 52 for 2015
27th December 2015 = Week 1 for 2016
----
25th December 2016 = Week 53 for 2016
1st Jan 2017 = Week 1 for 2017
-----
Tried various methods already
iso 8601, wrong week start day
intWeek = DatePart("ww", datDate, vbSunday, vbFirstFourDays) Was right for 2013 but wrong for later dates.
How to compare 2 strings in Access in order to determine one is biggest or highest than the other??
View 2 Replies View RelatedCurrently I have a form with these variables
- Assets
- Shifts
- Machine Offline Date
- Machine Offline Time
- Machine Online Date
- Machine Online Time
Now I have 82 assets in the factory and 20% of those machines run 3 shifts. Each shift is 8 hrs.What I have already done is allocate shifts per asset e.g. when I pick Asset (a) in the Asset combo box, in the shift box it will automatically generate 2 or 3 dependant on what I have set.
If an asset runs for 2 shifts, it would mean that, that asset is operational/running from 0700 - 2300 or 7:00am - 11:PM also if an asset runs for 3 shifts it would mean that, that asset is operational/running from 0700 - 0700 or 7:00AM - 7:00AM
Scenario A: Machine (a) breaks down at 1700/5:00PM on the 10/7/15 and was back online at 12:30 on 11/7/15, This machine runs for 3 shifts which would mean in the "Breakdown Downtime" the result should be 19.5 hrs
Scenario B: Machine (b) breaks down at 1900/7:00PM on the 10/7/15 and was back online at 10:00AM on 12/7/15, this machine runs for 2 shifts which would mean in the "Breakdown Downtime" the result would be 23 hrs.
I would like to make this an automatic calculation, Is this possible?
I have a text field like, 11242010, and I need to be able to convert it into 3 int fields, day, month, year. I am trying to do this in a query and have create the following three;
DateD: IIf([DATE] Is Not Null,(CInt(Left(Right([DATE],6),2))))
DateM: IIf([DATE] Is Not Null,(CInt(Left([DATE],2))))
DateY: IIf([DATE] Is Not Null,(CInt(Right([DATE],4))))
Time: IIf([TIME] Is Not Null,[TIME])
When I have a value of Null, i keep getting #Error, I think when it's null.
I have two tables that I want to append to each other.But in one of them the date column has the yyyymmdd format and in the other it is a serial date number.How can I make them consistent by either converting yyyymmdd to date number or by converting the date number to yyyymmdd?
View 1 Replies View RelatedMy table has many records for each month. I am creating a report that will display only the records in one month of a year. I have been able to create a form that gives the user the choice of the Month and Year for which to create the report. The code I am using to create the combo box is:
Code:
SELECT DISTINCT Month([QTDate]) AS MoNum, Format([QTDate],"mmmm yyyy") AS MoName
FROM MainTBL
ORDER BY Month([QTDate]);
What I need to do now is create the query for the report that displays all records for the chosen month and year. If I simply reference the combo box, all it shows is mmmm yyyy and the days are missing so the query doesn't work. What do I need to do to create the query so it displays all days within the month and date selected?
Hello
I have two tables with names of people in different forms.
table1 : [name] can be either in the form of :
- firstname & firstname surname
- surname, firstname
table2: [surname]
I'm trying to select all the records in table1 where [table2]![surname] is part of [table1]![name]
I've tried using
Like "*"&[surname]&"*"
This returns everything rather than the similar names.
I think this should be simple but can't work it out.
I have a program abc.mdb and abc.mde, I made some changes to the codes in abc.mdb and now I have been trying to convert the access file from abc.mdb to abc.mde so that the users are able to use the updated file. However, whenever I make MDE file. It doesnt work but creates another file called db1.mdb instead.
View 9 Replies View RelatedIs there an easy way to convert an old ACCESS db from version 2003 to version 2010?
My ACCESS db is .mdb and I want to convert it to .accdb as version 2010. It has hundreds of modules that may take awhile to export. Exporting is the only way I know to transfer from one db to another.
I have a file called CAPTURE.BUF. I am trying to convert it to text. Here is what I ahve done, but I get the message box ever time.
Public Function copyFile()
Dim SourceFile As String
Dim DestinationFile As String
SourceFile = "C:PCPICSWCAPTURE.BUF"
DestinationFile = "C:INVESTMENT_REPORTSCAPTURE.TXT"
On Error Resume Next
FileCopy SourceFile, DestinationFile
If Error > 0 Then
MsgBox "Could not copy mls file."
End If
On Error GoTo 0
End Function
Using 2010 (accdb format) on windows 7.I'm trying to convert a memo field's format from Plain Text to Rich text. The problem is that every time I try to select the Rich Text format option the field immediately changes back to Plain Text.
Just as a test a created a new memo field in the same table and set this to Rich Text (worked fine) then copied the records for the Plain text memo field to the new memo field. Unfortunately this removed all line breaks so instead of my text looking like
I'm getting sick of Access 2013 constantly doing this. I convert a macro to VBA form the ribbon menu then it doesn't run!
I've uploaded a screenshot of the latest error to irk me. This ran perfectly well as a macro but since i converted it to vba. (cos somethings i can do easier in vba than in macros) it doesnt run.
I am trying to convert a table that looks like the following...
Customer Name SumofSum of Bill Rate Reviewer
000462 John 500 Mike
000224 Mike 900 Jeff
I would like to covert it to....
Customer 000462 000224
Name John Bill
SumOfSum.. 500 900
Reviewer Mike Jeff
I don't think Access has any functions for this but I am not 100% sure. I know this can be done in a Module but I am not sure of how to code it.
When converting the Front End of my database to an MDE, Access just hangs and says (Not Responding). I've left it our an hour and there's no sign of stirring.The Back End converts in just a second or so.
View 5 Replies View RelatedI have form using a toggle option with four buttons. The values are 1,2,3 & 4. How can I convert the values to read (in the table) as words instead of values.
Example
1=dog
2=cat
3=bird
4=hamster
I have a text, date field I need to convert to a date field.For example: 2/11/14 is stored at text: 21114.How can I convert the 21114 into 2/11/14?
View 5 Replies View RelatedHow can I convert a Date/Time field into a Date field?
View 4 Replies View RelatedI'm using DAVG to look up average days in a query. All works fine but I'd like additional functionality. Here's what I have so far:
Code:
=DAvg("[kitted2completed]","KittedComp")
What I would like is the above to return an average based on dates from and to in column "Comp".I might want only data with a value between now() and 14 days ago. (ie jobs completed in the last two weeks)
I am trying to get my expiration date field to highlight a certain color once the date comes closer.I have weapons qualification dates. The user will input the date he/she qualified and then a expiration date (6 months from that day) automatically pops up.
Now what I want to do is once the expiration dates gets closer is change the color. So when it is 90 days from expiration it would highlight yellow, and when its 30 days away it would highlight red. I believe this can all be done through conditional formatting, but for the life of me I cant figure it out!!
I've been tasked to create a company client record database which permits several people at once to access and modify a communal database of clients. So far, so good. It's for a firm of solicitors, so I'd better get it RIGHT!!
One field requires the entry of a date, which the next field is supposed to automatically subtract 180 days from.
Is it possible for me to do this within the one entry form? The way I see it is that the first date would be entered, then the form would automatically display the -180 days result in the next box.
- I currently have a table that is labeled WorkSchedule. I then Created a query called WorkSchedule Query.
- The column labels are as follows (listed from right to left): Project, Event (something inside of the project), Employee1, Employee2, StartDate, EndDate
- I created a split form that shows each record.
- On each record I made the employee1, and employee2 as a drop down box that allows you to pick from all employees.
*MY QUESTION*
How do I make a pop up form appear when there is a conflicting date based on the employee I picked?
For example: If I had assigned Rebecca to an event that went on from 11/12/2014 - 11/14/2014. Then I tried to assign her to another event from 11/13/2104-11/15/2014. I want a pop up message saying that these dates conflict.
Are there no arrays in Access? I am looking for a way to put sequential dates onto a calendar. An array would work fine, with an offset for Weekday(FirstDayOfMonth).
View 1 Replies View RelatedI'm bringing an archived db into Access, with entry forms to continue on into the future for maintenance. In the past, some dates were recorded only to year (yyyy). Obviously, I won't continue that, but I need to integrate the old and new in a fashion that will sort. For instance, one form has a subform section based on a report to show the old entries, while below are unbounded text fields for making new entries (with a Save command button).
How to integrate partial old text dates with newly recorded dates.