replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - problem with convdate@
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem with convdate@

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Norm.Campbell



Joined: 31 Aug 2007
Posts: 66

PostPosted: Fri Oct 19, 2012 6:41 am    Post subject: problem with convdate@ Reply with quote

I asked in a general post if someone could tell me what the initial date for SECS is in CONVDATE@. I found online (http://www.silverfrost.com/ftn95-help/time/h_convdatea.aspx) that SECS should be the number of seconds since the beginning of 1970.

But I can't get the following simple test code to run -- it gives "date out of range''. Can someone please tell me where I'm going wrong?

program test_time_in_nanoseconds_to_date

integer (kind=3) n_secs

integer (kind=2) n_DoW, n_Day, n_Month, n_Year

itt = 6

n_secs = 100

call Convdate@ ( n_secs, n_DoW, n_Day, n_Month, n_Year )

write ( itt, '(/ 4i10 )' ) n_secs, n_DoW, n_Day, n_Month, n_Year

n_secs = 10 * 24 * 60 * 60

call Convdate@ ( n_secs, n_DoW, n_Day, n_Month, n_Year )

write ( itt, '(/ 4i10 )' ) n_secs, n_DoW, n_Day, n_Month, n_Year

stop
end
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8211
Location: Salford, UK

PostPosted: Fri Oct 19, 2012 8:45 am    Post subject: Reply with quote

There is an internal comment that says...

"Days since 1/1/1970 (only works after 29th Feb 1972)"

so you will need to use a suitably large value for n_secs.

n_secs = 10*365*24*60*60

gives a result that looks about right.
Back to top
View user's profile Send private message AIM Address
Norm.Campbell



Joined: 31 Aug 2007
Posts: 66

PostPosted: Fri Oct 19, 2012 9:01 am    Post subject: Reply with quote

Thanks, Paul

I'm really glad now that I posted a query, rather than stuffing around thinking that the problem was at my end.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group