Operaciones between fechas

Hola, Necesito UN ayuda con las fechas.

Tengo 2 fechas (struct tm), what if I need to you can hacer operaciones in base a las horas con estas fechas 2.

Add Principalmente y quitar horas.

Any ayuda o comment are bienvenido, muchas gracias.

Alex

Hola, here you have an example of operations in el tiempo; You can run estas líneas in the ventana for the Interactive performance.

#include 
#include 
static time_t t;
static struct tm *tm;

t = time (NULL);
tm = localtime (&t);
DebugPrintf ("Local time is %d-%d-%d   %d:%02d\n",
    tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);
DebugPrintf ("Adding 2 hours...\n");
t += 3600 * 2;
tm = localtime (&t);
DebugPrintf ("New time is %d-%d-%d   %d:%02d\n",
    tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);
DebugPrintf ("Adding 2 days...\n");
t += 86400 * 2;
tm = localtime (&t);
DebugPrintf ("New time is %d-%d-%d   %d:%02d\n",
    tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);

Las operaciones con MakeDateTime y las son similar related functions.

Tags: NI Software

Similar Questions

  • Why my notes sync between my Mac and iPhone?

    I have my MacBook Pro with Mac OS X 10.9.5 Mavericks and my iPhone is running iOS 10.0.1 and used to synchronize my notes! Is it because of the huge gap in operating systems? I SHOULD update my Mac to Mac OS 10.10 + for this problem? Thank you!

    In order to synchronize Notes between your Mac and iPhone, you must configure iCloud > http://www.apple.com/icloud/setup/

    But this requires macOS Sierra 10.12, the latest available version and the last iOS available for your iPhone.

  • sharing between two apple ID

    How can I share contacts and calendars between two Apple ID?  Also my wife and share our music iTunes between our IDs?

    See the following topics:

    http://www.Apple.com/icloud/family-sharing/

    Family shares - Apple Support

    Implement the family sharing - Apple Support

  • synchronization between the macbook pro and iphone works not

    My macbook pro and iPhone are not sync reminders or contacts. How wrong what?

    Hi cmatt3,

    I understand the reminders, and contacts are no longer sync between your iPhone and your MacBook Pro.  Here is an article I would recommend starting with this problem.

    Get help using iCloud Contacts, calendars, or reminders

    Please let us know if you aren't always sync after going through this article and thank you for visiting the communities of support from Apple.

    See you soon.

  • Trails of the icon when switching between desktops in the Sierra

    I noticed some display problems since the update for Sierra. I see some trails icon when switching between desktop computers as well as a line of 1px of random colors on the right side of the screen seems to be leftover pixels for the desktop switch as well.

    Here is a screenshot: https://cl.ly/hegc

    Here is a video showing the paths of the icon: https://cl.ly/hef9

    Any other light this or know how to fix? It's rather annoying.

    Thanks in advance,

    Brent

    Hello Brent Spore.

    Thank you for reaching out to the Community Support from Apple. I know how it is important to keep your Mac running properly, and I want to help him.  Whenever we see the behavior as what you described, it is a good idea to test the symptoms in a separate user in safe mode. This will help us determine if the remanence of the icon is linked to a problem with the user account or if it's a question broad system. The articles below will guide you through these steps.

    How to test a question in another account on your Mac.

    Try safe mode if your Mac does not end commissioning

    If the ghost still occurs in safe mode, then we know it is a question broad system and I would recommend backup your Mac and Mac OS re-install using recovery, as described in the articles below:

    Use Time Machine to back up or restore your Mac

    How do I reinstall macOS

    If the behaviour continues or if you encounter difficulties, the entire community is here to help.

    Best regards.

  • Is it possible to kern (widen the spacing) between letters in the Pages?

    Is it possible to kern (widen the spacing) between letters in the Pages?

    Yes, which version are you talking about?

    Peter

  • Sharing files between the Sierra of MacOS and Windows 10

    I'm using a Mac that runs by the Sierra of the OS and a Windows 10 pc. I want to share my files between for theses on my WiFi network. But I don't know how to set up. Can someone please help me to move forward? Thanks in advance.

    Greetings md firdaus,

    Thank you for using communities of Apple Support. It seems you want to share files from your Mac on a Windows computer.
    I recommend you to read this article, it may be able to help to implement the sharing between two computers.

    macOS Sierra: set up a Mac to share files with Windows users

    Take care.

  • How to find directions between two locations other than my current position. I finally gave up and use Google Maps.

    In the latest version of cards, there is not apparent until you find directions between two places when or is your current position. In earlier versions, we enter in two places of departure and destination. In the new version, you enter your destination into a search window, but there is no place to enter a starting location. The application assumes that your current place of residence is always your place of departure. It is a remarkable oversight by designers. Am I missing something?

    If you go to maps, you can search for a location. Once you find the place, press the route button. It is from your current location, but if you type on my position, next: you can change the location that you want the management of.

  • You can remove the gaps between songs in itunes 12.5.1.21

    How can I remove the gaps between songs itunes 12.5.1.21

    Unfortunately, user control in playback gapless disappeared several years ago.  There are different things you can try. You can use a different ripper to rip tracks omitting gaps (see XLD).  You can set crossfade overlap packed during the silence between tracks.

  • Four fingers sliding between the desktops?

    What happened to the ability of sweeping four fingers between desktop computers (Sierra)?  Is it gone or just hidden somewhere?  I looked in the trackpad system preferences and I see is the ability to scan to four fingers between apps fullscreen.  I used four-finger drag to move between desktops countless times every day, I hope that this feature did not go away or I'll be a frustrated Mac head.  If it disappeared (shouldn't be), how the hell move us between workstations?

    OK, I stumbled accidentally on a solution.  I have reset my desktop image and four fingers sliding between the offices came back.  Phew!

  • Have you Apple removed the ability to slide between the spaces in the Sierra of MacOS?

    I've just updated to Sierra of MacOS.  Front in El Capitan, I used to keep several spaces opened in the control of the Mission, although some of them were not in use with applications.  Allows you to easily switch between spaces that I slipped with 4 fingers on the touchpad of my MacBook.  Sierra this ability seems to have disappeared even if there is an option for "apps fullscreen.

    N ° have you checked the settings for the trackpad in system preferences?

  • Syncing iTunes between Apple devices without iCloud

    Hello

    I want to synchronize my iTunes between my Mac and my Macbook Air library.  I tried to connect via a cable Thunderbolt, but the icon does not appear in iTunes.  I believe to sync iTunes via iCloud, you pay a monthly subscription.  Is this correct?  Is the only way to do this via a USB port to a USB cable between the two devices?

    I use an old computer, but I don't think that file sharing can be done simply with USB or Tuunderbolt.  It can be done by using file sharing which is set up in system preferences.  Yet, I don't know that it is the ultimate solution for your desired result, particularly if you want to "sync" to your library. For iTunes on computers, there is not this function as another "synchronization" by ensuring that you have personally copied all the files from one to the other so that they are identical on both computers, or by using a common repository and only run iTunes on one computer at a time.  There are too many possibilities to list them all here, so it would be useful to have the exact details of you what you want to do (not that we can guarantee it won't be possible).  Oh, Yes, the official solution from Apple would use iCloud. Even in this case, it is not perfect sync as far as computers are concerned.  Corresponding has an annual subscription.

  • is it still possible to use I have Message between 9 and 10 IOS iOS

    my girlfriend has an iPhone 4S and we use iMessage much, I have an iPhone 6 s.

    is it still possible to message between iOS iOS and 10 9?

    Because the updated did a lot with this soft...

    I want to know this before the update

    Yes

  • When I type messages in social networking applications I can not get switched between the words or the cursier of this specific word that I want to continue

    When I type the message in other applications, I can't acess between word assume you that I typed the word syped instead of type in a paragraph, and I want that this word must be corrected impossible to go to this place it shows just the option {select, select all... etc} please help? / / /

    You use the keyboard as a trackpad- http://www.imore.com/how-use-keyboard-trackpad-iphone-6s

  • iMess not good work between nations?

    I have a lot of friends and other members of the family in German, the Poland and the Thailand, we are interested in iMess new functions with sending mess have music, graphics... but we can do that when send us them to other cannot receive to see. We can only see a notice about this mess, but I send them with other friends in vietnam, it's so good work!

    So, between the nations iMess cannot work well? Pls check again

    Messages from Apple app works between different countries, unless a specific country blocks Messages

    In your sentence "that we send them to other cannot receive to display it. We can only see a notice about this mess. "

    That yo mean by: "we can only see a notice about this mess? Everything you see?

    Are yo saying: you cannot successfully send Messages to tham? They can successfully send Messages to you?

    They have an iPhone, iPod touch or iPad?

Maybe you are looking for

  • Search en multicolumn list

    Hola, tengo una data series (obtenidos una base datos mediante ODBC, con el modulo Database) en UN area multicolumn list, como puedo hacer para una search ahi realize? preferencia pasarlo o a UN table? Saludos!

  • How to analysis the computer to my HP 8500 A909g to my MacBook Pro

    I have a MacBook Pro running 10.8.4. I can't have the scanning to the function of the computer to work. I downloaded the latest drivers from Apple for Mountain Lion. I uninstalled and reinstalled the printers so that rerun the configuration utilities

  • Problem with the shortcut menu custom BB10

    Hi all I am currently trying to implement a context menu that is customized with my webworks app. So far I'm not creating a normal webworks / bbUI app, but I'm trying to add some features of bbUI. So to speak, I have a few different elements in my ap

  • BlackBerry smartphones HELP! I get the message "memory full".

    When I launch my voice command to make a call sometimes I get a message that says "memory full". What is everything? In addition, another thing that drives me crazy is that when I get a call or go to make a call it takes sometimes a lot of time for m

  • Win 8 upgrade - the user can cause dual boot using the same license?

    Hello Thanks to MS for offers updated Win 7 for win 8 to 14.99 USD for all new buyers of Win 7 PC after June, 2012. I'm one of the eligible candidates for the upgrade at this price. However, I spent a lot of time, money and effort to put in place the