473,657 Members | 2,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get date difference of integer and timestamp in days?

3 New Member
hi
i want to get date difference between two columns. month and DOJ in days. month is integer datatype and doj is in time stamp. the colums data was like this. i mentioned '|' in btw of 2 columns for your clarification.

doj | month_sid

5/30/2008 12:00:00 AM | 201103
5/19/2008 12:00:00 AM | 201111
5/19/2008 12:00:00 AM | 201112
5/19/2008 12:00:00 AM | 201201
5/19/2008 12:00:00 AM | 201202
5/19/2008 12:00:00 AM | 201203
5/19/2008 12:00:00 AM | 201204
5/19/2008 12:00:00 AM | 201106
5/19/2008 12:00:00 AM | 201107
5/19/2008 12:00:00 AM |201108


i cant able to get difference of both. can you please help me. its too urgent.
Jul 26 '12 #1
2 2811
PsychoCoder
465 Recognized Expert Moderator Contributor
Well for starters Bytes is not a code writing service. We will help where we can if you provide the code that's causing the errors, but we're not going to just give you what you ask for.

NOTE: Putting urgent in the title isn't going to get you help any further.
Jul 26 '12 #2
Rabbit
12,516 Recognized Expert Moderator MVP
I concur with what PsychoCoder said.

But here's a hint, convert your integer field into a date so that you can calculate the days.
Jul 26 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6980
by: praba kar | last post by:
Dear All, In Php strtotime() will change a date string into timestamp. I want to know which python function will change a date string into timestamp. Date string format is below
7
11004
by: Ben | last post by:
Hi, What is the synatx in C# for calculating date difference between 2 dates in terms of no. of days? Thanks, Ben
29
9100
by: james | last post by:
I have a problem that at first glance seems not that hard to figure out. But, so far, the answer has escaped me. I have an old database file that has the date(s) stored in it as number of days. An example is: 36,525 represents 01/01/1900. The starting point date is considered to be : 00/00/0000. I have looked thru Help and used Google and have not really found an answer. I know that Leap Years need to be accounted for too. Any...
5
3247
by: Simon Dean | last post by:
Probably being a little thick here, but when you subtract one date away from another, how do you convert the resultant value into a number of days... I guess I could easily / 60 / 60 / 24... but that seems barbaric... Anything neater? Cheers Simon Ps, Im also just trying to work out how to calculate the number of mondays and tuesdays etc between two dates... Just thought I'd run this
1
7266
by: rockysg | last post by:
I need to create a page which takes input from a field from MS Access Database which has one date and there is another field in the MS Access Database which has another date. I want to find the date difference in no of days from these two fields using ASP VBScript. Kindly Help me out.
7
2468
by: rdawadiuk | last post by:
hi, I would like to calculate the date difference between two dates using field names which I have in my table. The field name is " Account opened on" for eg If the "Account open on" is Jan 5, 2007 the I would like to calculate the date difference between this date and the end of the quarter (March 31 2007) I would like Acess to calculate this difference automatically without me entering the end of the quarter date. please help thanks
6
9015
by: krishnakant Mane | last post by:
hello, I am strangely confused with a date calculation problem. the point is that I want to calculate difference in two dates in days. there are two aspects to this problem. firstly, I can't get a way to convert a string like "1/2/2005" in a genuan date object which is needed for calculation. now once this is done I will create a another date object with today = datetime.datetime.now() and then see the difference between this today and...
3
2457
by: backups2007 | last post by:
what code should I use to extract and date in a timestamp? please help. thanks in advance.
20
3602
by: madhu3437 | last post by:
i am in big problem Under unix C Language i want return date format like MM/DD/YYYY this function should return above format . using system date calculate last 6 days mean clearly i am explain today date is :06/09/2008 the function return 06/03/2008
4
2064
by: Carl Witte | last post by:
Has anyone got a good method to calculate buisness days differences or predict a date based on buisness days? For example, If today 9/12 I place an order from vendor A they will say OK it will be ready in 10 business days. That means it will be ready on 9/26. If I had the same order on 8/29 I would have the order ready on 9/15. My best idea is to put a table of dates that are holidays for my vendor (I have to work the day after...
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.