[8i] problem of calculation of Date/time...

So I am currently faced with a situation where I need to calculate the total number of hours that a workstation is in use for each day in a given period. I have a table with newspaper each time that each workstation is used. The problem is a workstation can be used for any period of time, commencing on any day and ending on any day. This means that a particular log entry may extend over several days. I don't know how to split the difference between the time of the end of an entry and departure date/time of entry over several days.

Here is a sample table and some sample data for what I'm doing:
-- Note: in reality, this table contains more columns
CREATE TABLE     my_hrs
(     record_id     NUMBER     NOT NULL
,     sdatetime     DATE     
,     edatetime     DATE     
,     workstation     VARCHAR2(4)
     CONSTRAINT my_hrs_pk PRIMARY KEY (record_id)
);

-- Note: sdatetime, edatetime, and workstation CAN all be NULL, though I won't provide
-- any sample data for these situations since I want to ignore them in my results
-- Additionally, there are hundreds of workstations, but I'm only using 2 to simplify the sample data

INSERT INTO     my_hrs
VALUES (12345,TO_DATE('03/01/2010 08:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 13:35','mm/dd/yyyy HH24:MI'),'123A');
INSERT INTO     my_hrs
VALUES (13427,TO_DATE('03/01/2010 08:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 10:02','mm/dd/yyyy HH24:MI'),'321B');
INSERT INTO     my_hrs
VALUES (21543,TO_DATE('03/01/2010 14:07','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 16:30','mm/dd/yyyy HH24:MI'),'123A');
INSERT INTO     my_hrs
VALUES (22412,TO_DATE('03/01/2010 10:15','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 15:30','mm/dd/yyyy HH24:MI'),'321B');
INSERT INTO     my_hrs
VALUES (11976,TO_DATE('03/01/2010 17:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
INSERT INTO     my_hrs
VALUES (34215,TO_DATE('03/01/2010 22:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 04:30','mm/dd/yyyy HH24:MI'),'321B');
INSERT INTO     my_hrs
VALUES (24789,TO_DATE('03/02/2010 13:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/05/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
INSERT INTO     my_hrs
VALUES (31542,TO_DATE('03/02/2010 21:30','mm/dd/yyyy HH24:MI'),TO_DATE('03/04/2010 10:30','mm/dd/yyyy HH24:MI'),'321B');
According to my data in the example above, these are the results I want to see:
WORKSTATION     DATE          HRS_IN_USE
------------------------------------------
123A          3/1/2010     14.96667
321B          3/1/2010     8.95000
123A          3/2/2010     13.50000
321B          3/2/2010     7.00000
123A          3/3/2010     24.00000
321B          3/3/2010     24.00000
123A          3/4/2010     24.00000
321B          3/4/2010     10.50000
123A          3/5/2010     2.50000
321B          3/5/2010     0.00000
Is this possible? (Please note that if the workstation was not used on a particular day, I want to show him 0 for this workstation for that day). Another thing to note is that I work with Oracle 8i.

Thanks in advance for the help!

Hello

user11033437 wrote:
Sorry, bind variables are DATEs.

Where are you running that? I assumed it was SQL * Plus, where the bind variable can not be DATEs.
That's exactly why I wanted a full test case.

user11033437 wrote:
The WHERE clause is the culprit here.

SELECT  p.min_date  + ROWNUM - 1      AS a_date
,     p.min_date + ROWNUM         AS next_date
FROM     all_objects
,     (     -- Begin in-line view p to define parameters
          SELECT      :start_date  AS min_date
          ,      :end_date  AS max_date
          FROM      dual
     ) p     -- End in-line view p to define parameters
-- WHERE     ROWNUM <= p.max_date + 1 - p.min_date --this is causing the error

Published by: user11033437 on March 12, 2010 09:02
Replaced the post with something SPECIFIC

Thanks, I appreciate it.
A surprising number of people on this forum does not seem to see the value of posting something specific. It's a great relief to work with someone who does.

I said how I could not simply subtract two dates, t1d - T2D, in a place determined; I had to use TO_NUMBER (t1d - T2D). Maybe even workaround will be used here.

user11033437 wrote:
When I run the subquery p by itself and add a line to avoid the sdatetime of edatetime and look at the results, it seems that he could return the difference between two days of a type of INTERVAL data, rather than a number...

SELECT      :start_date  AS min_date
          ,      :end_date  AS max_date
          ,      :end_date - :start_date AS my_int
          FROM      dual

I discovered that if in the end I have will be querying this database and another, however the other database is Oracle 8i, 9i is obviously...

sigh of frustration

It may seem reasonable (at the time your conclusion and your frustration): intervals have been introduced in Oracle 9. (However, I noticed that sometimes "what's new" were actually available, although without papers, in earlier versions).
Yet once again, how are the bind varibales defined? Looks like they are the timestamps. Subtracting two DATEs results in a NUMBER, but by subtracting two stamps produced an INTERVAL. You can change to the DATEs where they are defined?
Try to use TO_DATE or CAST in the subquery p, to ensure that it produces DATEs:

,     (     -- Begin in-line view p to define parameters
          SELECT      CAST (:start_date AS DATE)  AS min_date
          ,      CAST (:end_date   AS DATE)  AS max_date
          FROM      dual
     ) p     -- End in-line view p to define parameters

Tags: Database

Similar Questions

  • Date/time field calculation

    Hi Experts,

    Our requirement is in the Service request object when one of the values from the drop-down list is changed into announcements, then the column date deadline must fill in with the value of the 4 hours added to the current date/time date/time.

    How to get there. Therefore, I see no function to perform calculations on date/time fields.

    Immediate response is appreciated.

    Thank you and best regards,
    Lemu

    Hello
    You will need to create a WF for this.
    Name of WF: Change status
    Raises the event: before save modified record
    Record Service of Type request:

    In Action of WF
    Name: Update Date
    Type: field update
    Field name: Your domain name
    value: Timestamp() + Duration ('P0Y0DT4H')

    It's your problem.

  • Problem of calculation Manager: planning starts the same rule several times

    We have a very odd behavior to our Oracle EPM System 11.1.2 environment. Whenever a rule of calculation Manager takes more than 5 minutes at the end, Planning begins to run again and again. In some cases, the beginning of rules down and post the error messages, others to complete correctly, after launching several times.

    The journal of planning looks something like this, after the launch of the rule only once:

    2011-07-08 14:13:41, 726 NEWS Thread-115 calcmgr.launch - Date/time began: 2011/07/08:14:13:41.726 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    2011-07-08 14:18:41, 737 calcmgr.launch INFO wire-117-Date/time began: 2011/07/08:14:18:41.737 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    2011-07-08 14:20:37, 723 calcmgr.launch INFO wire-115-Date/time end: 2011/07/08:14:20:37.722 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.
    2011-07-08 14:23:41, 751 calcmgr.launch INFO wire-118-time started: 2011/07/08:14:23:41.751 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    2011-07-08 14:24:48, 093 calcmgr.launch INFO wire-117-Date/time end: 2011/07/08:14:24:48.093 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.
    Reaquired rental list task: Fri Jul 08 14:28:12 COT 2011:1310153292779
    caching with composite grid: 55475421
    compositeGrid: com.hyperion.planning.olap.HspCompositeGrid@34e7cdd
    2011-07-08 14:28:41, 765 calcmgr.launch INFO wire-119-time started: 2011/07/08:14:28:41.765 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    2011-07-08 14:30:44, 116 calcmgr.launch INFO wire-118-Date/time end: 2011/07/08:14:30:44.116 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.
    2011-07-08 14:33:41, 779 calcmgr.launch INFO wire-120-time started: 2011/07/08:14:33:41.779 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    2011-07-08 14:34:07, 110 calcmgr.launch INFO wire-119-Date/time end: 2011/07/08:14:34:07.109 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.
    2011-07-08 14:38:41, 793 calcmgr.launch INFO wire-121-time started: 2011/07/08:14:38:41.793 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin
    Time in seconds: 0
    Time in seconds: 0
    Time in seconds: 0
    Time in seconds: 0
    Time in seconds: 0
    Time in seconds: 0
    Time in seconds: 0
    2011-07-08 14:39:21, 108 MORTALS Thread-121 calcmgr.launch - Date/time closed: 2011/07/08:14:39:21.108 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.     Exception: com.hyperion.planning.InvalidCalcException: an error occurred when executing the specified calc script. See the log for more details.
    2011-07-08 14:39:31, 171 FATAL-120-Date/time end thread calcmgr.launch: 2011/07/08:14:39:31.171 COT/Application/database server: localhost/COL_PYG/PYG Business Rule Name: 1.5 General. Operat Catast Seguros committees of planning user: admin.     Exception: com.hyperion.planning.InvalidCalcException: an error occurred when executing the specified calc script. See the log for more details.

    My guess is you have changed the time of do not expire on the standard interval rule and of course to have long-term rules.

    Consult the support company article rules that take more than five Minutes to execute are Re-launched several times [755406.1 ID]
    https://support.Oracle.com/CSP/main/article?cmd=show&type=not&DOCTYPE=problem&ID=755406.1

    I saw cases where a firewall or load balancer has been filed to cut connections to certain intervals, forcing the browser to submit the application re-launch. In our case, I believe that the support article is the appropriate path for your problem.

    Kind regards

    John A. Booth
    http://www.metavero.com

  • Internal battery / Date/time problem

    My NEX-6 will only keep the date/time information after I put it. He was dead when I got it, but after the normal battery charging to full and using the camera, whenever it is turned off, it forgets the time. I did some research online, which said it may take a while to recharge the internal battery, but I tried to charge for 24 hours straight, and using the camera frequently (as described in the manual) and doesn't seem to solve the problem.

    Once, after leaving unused for a few days, I noticed that he miraculously started saving the date correctly, even when it is off. This lasted about a week, but now he has lost the ability to keep the time again, and with the charge Jack did not set.

    Any thoughts? Apart from sending to Sony to repair?

    I tried the factory reset but that did not work. As I don't have a battery (and don't want to buy a second, in which case it is not the problem), looks like I'll need to come back for the service.

  • My date/time settings mobile keep returning to time and dates in the past frequently, is there a fixx for this problem?

    My Lenvo V570 keeps returning to different dates/time in the past, and he is only 6 months old? It has Windows 7 64 bit os. At an i5 QuadCore Intel processors inside. Is there a software fix or patch to stop this problem?

    Lisa,

    A low CMOS battery can sometimes various issues, including slow, locking unexplained performance issues as well as others.

    It is quite rare, but the battery is relatively easy to replace, check the manual of your computer/motherboard for replacement details.

    Generally, the battery is a watch battery "CR2032", about the size of a nickel.

    I have yet to see a laptop whose battery is easy to replace...

    Here is a simple test to check if the battery needs to be replaced:

    1. Start the computer in Mode without failure.
    2. Set the date and time.
    3. Stop the machine.
    4. Remove the battery from bit and disconnect the machine from the sector.
    5. Wait at least 24 hours.
    6. Start the computer in Mode without failure.
    7. Check the date and time.
    If the time is incorrect then you are probably dealing with a flat battery from motherboard. You will probably get the machine to replace unless you have good skills in disassembly of electronic components.
  • Date/time/web address stamp - printing problem

    My printer has always printed the stamp of date/time/site address when the Web well above the edges of the paper up to a month. Now print only about 1/5 of the line and is not readable... other 4/5 printing is above/below the edge of the paper down. I adjusted the margins and the header/footer settings and that did not solve the problem. Any help is appreciated. Have an officejet all-in-one 4620.

    I solved the problem myself... I printed some photos and on properties that I chose without borders, as opposed to (default) border... by trial and error, I found that it was the problem. When I chose with border, the info will print correctly.

  • Problem with Capture Date &amp; time change

    I just became aware of a problem with the Date of Capture use to is very strange. Initially, a brief explanation of the import workflow I'm used with jpeg image 6 iPhone since Lightroom Mobile was presented. The images appear in the section of times iPhone app Photo, and from there I transfer to a collection in Lightroom Mobile. Once the collection syncs to Lightroom on my Mac (running latest El Capitan), they sort by capture time and I make choices and rename images. I have a naming preset that adds automatically the date to all the images. Recently, I noticed that some of these images, but not all, have been appointed with the wrong date. I had traveled without my computer - only my iPad, and it was a month before the images have been synced on my Mac it was very obvious that the dates were incorrect. The problem may have expressed earlier, but if the date was off by a day or two he would not have been as sensitive.

    The problem occurs when I take pictures with the app in time of MomentLens company. I use the application because it is designed to work with instant attachment lenses and the case of the Moment (which makes no difference in time to capture problem).


    Once that the images are added to LR Mobile news for images show good capture date and time. That's when they images sync for LR (latest version) that the problem occurs. And this is not a problem of LR Mobile, such as changes of date and hour occur if images of the iPad are added to LR without using mobile LR (from the iPad to Mac with AirDrop). Looking at the EXIF metadata Panel in LR, images taken with the iPhone camera app show three dates: Date time Original Date time digitized and Date time - all the which three are the same. Show only pictures taken with the application of the time Date time, but it's the same as in the iPhone Photo app and in LR Mobile capture time. However, when I show info on imagine in Lightroom, the time that appears to capture the time is the time that the image has been synchronized (if it came at LR Mobile) or the time that the image has been added to the iPad over wifi. It is also the time that is added to the preselection of naming. Note that if I send a picture directly from the iPhone to the Mac with AirDrop the date and time is correct.

    For the life of me, I can't understand this anomaly. I did thorough Imaging tests, and it happens only with the application of the time - other camera apps do not exhibit this problem. Interestingly, LR recognizes both the time Soft, which is reported under EXIF on the range of software and the lenses of the Moment when it is used with the iPhone the Moment case.

    If anyone has any ideas I'd be pleased to entrance. Thank you

    The link to the file is Dropbox - Photo of the Moment

    I have just confirmed with Exiftool that the sample file does not EXIF:DateTimeOriginal, although it does not contain EXIF:DateTime.

    You can send the following to the current time, the EXIF 2.3 specification:

  • File modification date/time problem

    Hello

    I'm trying to use file of a file modification date/time to fix a system of synchronization between a blackberry and a PC. However, the date/time of the file is not updated as I expected.

    The following occurs:

    -Using a program, a file is modifidied to make more than 100 bytes.

    -> When checking for windows Explorer (using the mass storage mode to access the file) the change date is updated

    -Using the same program, the file is changed to be the shorter of 50 bytes.

    -> When checking for windows Explorer, the change date is NOT updated

    -Using the same program, the file is modified to be more than 20 bytes.

    -> When checking for windows Explorer, the change date is NOT updated

    -Using the same program, the file is modified to be more than 100 bytes. It is now longer that he has never been.

    -> When checking for windows Explorer, the change date is updated

    The code that updates the file is basically something like this:

    FileConnection connection = (FileConnection) Connector.open (fileName, Connector.READ_WRITE);        {if (!) {(Connection.Exists ())}
    Connection.Create ();
    }
    OutputStream out = connection.openOutputStream ();
    Output PrintStream is new PrintStream (out);.
    output.println ("a lot of text ');

    Various printlns... followed

    output. Close();
    out. Close();
    Connection.Close;

    I use a v4.5.0.55 8310 platform, 2.7.0.68.

    BlackBerry JDE 4.5.0.7

    Any ideas what's wrong?

    Kind regards

    Anders

    Yes, delete the file is kind of a workaround. Last updated date/time will be correct. Created date/time will be of course lost, however, since the time created is generally much less important that her last updated date/time is better.

    I ended up doing the following whenever I change a file of Java code:

    FileConnection connection = (FileConnection) Connector.open (fileName, Connector.READ_WRITE);

    {if (Connection.Exists ())}

    Connection.Delete ();
    }
    Connection.Create ();

    Thank you

    Anders

  • frustrating problem with a dat/time field

    I'm pretty new to this tool (LiveCycle) - once more to try to modify/create a pdf form on very simple writing

    I inserted 2 fields of date time. I have a correctly configured automatically insert the current time, when the form is opened so the user does not have to do... ;

    The following field must be a time field so that the user does not enter anyone.

    I have the date field load properly, but for the life of me cannot get the time to display at all.  I tried:

    1 Add a new date/time field

    2 duplicate one that works and just change the format of 'Time '.

    3 tried to remove them both and then create again.

    I discovered by removing both and starting, as I can get the date to appear in these two areas, but I can't do anything else to appear.  I can not get the time to appear in each area. !!

    Frustrated: Somebody can tell me what I'm doing wrong here...

    Because I don't see a place for me to download the form here, I posted on the following Web site

    I think you just download it and take a peek - if someone would be so kind - could explain things better to see for yourself.  It seems buggy to me, but I do not know!

    Thanks in advance,

    Dan has.

    See: http://provsnusa.com/test.html

    Hi Dan,.

    The time field was still date in script functions, although you use a time model (in the object > field > models).

    Just changed the script for:

    Current time in short-style date format.

    $ = num2time (Time (), TimeFmt (1))

    Here is the form: https://acrobat.com/#d=63FQyQ3bVTlj8ERIjvUGJw

    Good luck

    Niall

  • Date/time format not work server

    Hello


    I guess there is a lot of excitement with the recent release of Adobe Dreamweaver CS3 and I like many others have chosen this way to upgrade


    My problem - I don't seem to be able to use dynamic data successfully selectable formatting in CS3 (not fully) some of the formats as currency and number work very well formatted...


    Function DoDateTime (str, nNamedFormat, nLCID) function code is not transferred on the web page, with that I work or is the dynamic element encapsulated when I select a Date/time format.


    After having spent the last 6 months, build a planning (ASP VBScript Application) I came across many issues locale date, date of shaped and calculations etc. but for the life of me, I can't give a sense questions that I now have.

    I realized this problem on my two desktop Vista and XP - new own websites (for testing)
    I might add CS2 not presented no problems in this area - which indicates the problem persists with cs3 (Bug?)

    I would be very grateful for any input or advice help...

    Well Yes...

    ASPvb script

    Thanks for the control of Mr Adobe - it seems that someone in the development of the production misnamed the file source DateTime in the Formats.xml file.

    The formats.xml file is a reference to the source file as DateTime Date/time NOT

    Remove the slash in the file reference name and everything works fine...

    See the path of file-
    C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\ServerFormats\ASP_Vbs\Formats.xml

    Now to return to developing countries... What Date/time/Frustration!

  • Daylight Saving Format Date/Time String vs get time in seconds

    Hi all

    I have developed a real-time application using a cRIO 9074 which has two loops. The first gathers data and records the time using the module of ' string of Format Date/time ' with the following time sting: '%d/%m/%Y % H: %m ". The output is a sting with mouth/day/year hour: minute.

    The second loop Gets the cRIO time using the module "get Date/Time in Seconds ' and the output of timestamp is sent by a shared variable for an application that is running on a local computer.

    The problem started Sunday last with DST. With the help of MAX I am able to see that the time of cRIO is bad (1 hour less) and that him "automatically adjust clock for daylight saving time" is not checked and gray, so I am not able to change it.

    The time of the first loop by using the "Date and time Format string' returns the time elapsed between the cRIO (1 hour late), however the time of the second loop is OK. I have manually corrected time using MAX, so now the first loop is correct, and the second is now over an hour.

    Any ideas?

    Dear RavensFan, thank you very much for your answer.

    However, this was not the problem. Apparently the result with or without the element of DST is the same. I solved the problem, for now, by changing a parameter not on the function "get Date/Time in Seconds" but on the time stamp indicator.

    By right clicing the indicator and go to the display Format and the advanced editing mode, I have changed the Format string to a universal time container of this: %< %="" h:="" %m="">< t="" %="" ^="">< %="" h:="" %m=""><>

    Apparently the time from the 'get time in seconds' is still an hour longer, but now it is correctly displayed.

  • Date/time format and different regions

    I'm developing an application in this case to the United States on the English LV2009 software.  This application will be installed in many parts of the world, and I just discovered a problem with the date and time that I try to understand.  A screenshot of the application running on a Chinese computer is attached.  At the top right there is a 'results save location' which has a month and year added file name.  I use the date/time format with modifiers for the name of the month and the year in 4 digits (%B %Y).  On my PC, it displays in July 2010, but on Chinese computer it 7 01.  In addition, the reason that it says wrong serial number is that I compare the SN 2-digit year, and it seems to enter it correctly.

    On my PC, I tried to change my date settings in Windows and it doesn't seem to affect the production, as it does on Chinese computer.  I know there is a UTC Boolean selector which can be activated.  That will make a difference in the way that the date is displayed by this function?

    This is one of the few issues I encountered when developing a program for several regions, but it is currently the only one, I have not yet solved.

    I would expect month name to be specific langauge.

    For example, the word April in French is April and is abbreviated Apr. I would use a number instead of the name.

    The thai calendar + 543 years compared to the Western calendar, so a PC Thai could show a specific locale of 2553-07-13 date. Your computer may display 13/07/2010. I'm sure that the year of the Chinese calendar is different from that of the Western calendar.

    Using UTC should force LabVIEW to use the Gregorian calendar, based on the ISO-8601standard.

    Because your users work with technology and would probably recognize a Gregorian day/month/year combo I would stick with % Y_ m_ % d. % and UTC = TRUE.

    I contributed a VI to the community OR that you could use if you wish. It has many options and is based on ISO-8601

    .

    http://decibel.NI.com/content/docs/doc-7199

  • Write the Date/time value to a Ms Access table

    I have a headache. Here is the statement I send and the error I get:

    INSERT INTO VALUES (TestID, DateTime) measure (8732, #' 2015 - 01 - 28 16:17:58 ' #);

    NI_Database_API.lvlib:conn Execute.vi-> 2.vi Untitled-> Untitled 1. VIADO error: 0x80040E14
    Exception occurred in the Microsoft JET Database Engine: syntax error in INSERT INTO statement. in NI_Database_API.lvlib:Conn Execute.vi-> 2.vi-> vi Untitled 1 Untitled.

    I tried most of the possible combinations of #, "," around the datetime string and I also tried datetime string formats YYYY/MM/DD hh: mmS AM/PM, DD/MM/YYYY "

    In writing to the other data fields don't cause any error, I only get the syntax error when I try to write in the DateTime field (data type Date/Type)

    I use LV2012 with database connectivity kit and MS Access 2010 (stuck with it, cannot be changed). Same problem with the connection of the user DSN or UDL (jet engine).

    It works with the DB tools Insert Data.vi but we want to use a direct INSERT statement using the DB tools run Query.vi, because we have had a few locks error 0 x 80004005 which can be caused by the DB tools Insert Data.vi using ADODB. Recordset.

    Is attached the vi that I use for debugging.

    Ben64

    Finally found the problem!

    Even if the data type is Date/time in Access, and it is possible to define the name of the DateTime field it seems to be a small Word when you use a SQL statement. The solution is to add DateTime hooks like this:

    INSERT the EXTENT (TestID, [DateTime]) VALUES (1,'2015-01-28 06:52:16 ');

    Thanks for your help Cosworth.

    Ben64

  • TDMS of MDF time stamp conversion error / storage date time change

    I fought it for a while, I thought I'd throw it out there...

    Let's say I have a file TDMS which has a channel of labview time stamp and thermocouple 2.

    I load in DIADEM, I get this:

    Perfect!  But now let's say I want to save the PDM as a MDF file so I can see him in Vector sofa.  I right click and save as MDF, perfect.  I started couch and get this:

    The year 2121, yes I take data on a star boat!  It seems to be taking the stamp of date/time storage TDMS as starting point and adding the TC_Timestamp channel.

    If I change the channel of TC_Timestamp to 1, 2, 3, 4, 5, 6, 7 etc... and save as MDF, I get this:

    Very close, 2012!   But what I really want is what to show of the time, it was recorded what would be the 10/09/2012.

    The problem is whenever I do like recording, date storage time is updated right now, then the MDF plugin seems to use it as a starting point.

    is it possible to stop this update in TIARA?

    Thank you

    Ben

    Hi Ben,

    You got it right that the MDF use written the time of storage to start MDF that is updated by DIAdem when writing time. We are working on this and will return to you, if there is no progress.

    To work around the problem, you can try convert TDMS MDF in LabVIEW storage vis.

    Something like the following, you can write your start time of measurement to the MDF file.

    Hope this helps,

    Mavis

  • conversion of the error of date / time when using easy excel reports

    I export a 2D array to an excel file using Excel reports easy vi. I have no problem with that. My data has a number of areas with different formats (text and date/time). My problem is the following:

    * some (in other words, not all data is in the same worksheet) the veiled values of date/time to mm/dd/yyyy format whereas they should be in mm/dd/yyyy (is the excel format it is y in!). Essentially, I have 30/09/2008 (September 30, 2008) in a cell. After ticks on Oct. 1, it will display the date as, 01/10/2008. Excel thinks that this date is in the format dd/mm/yyyy.

    This is a known error in earlier versions of Excel (2002), in particular when you convert a .csv, .xls file. The solution, it was not to add "Local: = True ' at the end of the vba command string (see here: MS Knowledge Base). Here, in LabView I'm not sure how to proceed.

    I tried to change the format of the column in question to the 'text' by calling an Excel Macro in LabView, but do you think I can find the vba command to do? No, not so much.

    LabView saves the Excel file in 97-2003 format (I use MSOffice 2007) and I wonder if the version they are using does not consider the time correction, as described in the knowledge base (or if it applies).

    Any suggestions, I'd love to hear from you.

    Kind regards

    David.

    Hi LaRisa,.

    I was able to find the cell Format Excel set vi and successfully change the format of the value of the cell. It wasn't until I had found the vi that I realized that I've been down this road before. Change the format after the table has been created does not change values dd and mm switching that has already occurred. However, if I did before I "created the table" (or vi Excel table) and set the format to be '@' then it displays the string like 'Text' in the Excel file. That's nice. I can control what cell, row, or column to format now. If I want to be in a date format then I must apply the Format of cell vi after the easy Excel table vi.

    It sounds like a stupid race around me...

Maybe you are looking for

  • the network became the default browser, how do I remove

    How can I get rid of the network more is a browser default search

  • 6-403 Server error

    HP photosmart 5514 Windows7 64-bit I get error 6-403 on Google cloud print and e-print server that I ever try and can't find a way to get a new printer code can anyone help please

  • Too much RAM

    My computer to windows 7 Home Premium 64-bit use about 50% of RAM when idle with nothing open. This is not good. I got about 16 accidents last month. Finally, they stopped for 2 weeks. But now, there is a problem with my RAM. In addition, my computer

  • Problem uninstalling real key Adobe installed without asking me.

    Hi, new Acrobat installed 2 programs that I didn't not ask or want to.  I got McAfee.  (Already have Norton).  I STARTED taking the real key, but he asked me to close my browser.  I could not close immediately since I'm downloading something.  When i

  • DVD - items 11 (windows)

    I bought a dvd from my local store Mac - PS 11 elements, about a year ago. Never installed in time.Having a MacBookPro running 10.11.1 (later), and when I put the disc in, I can't see where the pilot (probably above all because he said Windows on the