Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting seconds since midnight Jan1, 1970 to a proper date/time

Status
Not open for further replies.

boraborasa

Technical User
May 21, 2001
2
0
0
US
I had records that appeared as numbers such as 988,650,723 which is in fact a date field. I was able to convert this to a proper date by using the following formula:
Datevar NewDate:=Truncate({slips.c_date}/86400)+Date(1970,1,1);
Now this field is a date field such as 4/30/2001.
However, now I want to pull just the dates from 4/1/2001 to 4/30/2001 in my report to generate a report for the month of April.
Can you tell me how I can generate this report just for April?
Thanks for your help.
Bora
 
Use the select expert to select just the records from april.
In preview mode, right-click on the date field and choose 'select expert'. Then, pull down the 2nd drop-down list (the one that should say 'equal' by default), and select 'between'. Then enter the date range in the box provided. I hope this helps. I'm not sure I completely understood your question, though. Is the date field in your report a formula that translates the number of seconds into a valid date? If so, the use the select expert on that field.

Kevin
 
I was able to figure it out after I posted the question.

Thanks a lot for your help.
Bora
 
unfortunately this is wrong. You also have to calulate leap years and for some reason it seems to be off 1 second ever 11 years as well. Sorry to burst your bubble but it is not an exact solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top