similar to: Method for returning a random date between two dates

Displaying 20 results from an estimated 200 matches similar to: "Method for returning a random date between two dates"

2008 Sep 10
1
help: error handling in try
First time to post and searched archive for this problem with no clue. My version is 2.5.1. Below is a function to check if a given date is a valid date to a given date function object. It uses try (also tried tryCatch but with same problem). When given an invalid date, I am hoping try will generate en error message which would be picked up by the geterrmessage and thus expecting a false result.
2007 May 27
1
Problem while working with SPSS data
Dear all R users, I got a strange problem while working with SPSS data : I wrote following : library(foreign) data.original = as.data.frame(read.spss(file="c:/Program Files/SPSS/Employee data.sav")) data = as.data.frame(cbind(data.original$MINORITY, data.original$EDUC, data.original$PREVEXP, data.original$JOBCAT, data.original$GENDER)) colnames(data) = c('MINORITY',
2009 Sep 17
3
Simple as.Date question dealing with a timezone offset
I've been trying to understand the as.Date functionality and I have a date and time stamp field that looks like this: "Tue Sep 15 09:22:09 -0600 2009" and I need to turn it into an R Date object for analysis. Simple date conversions I have down, no problem: > adate = c("7/30/1959") > as.Date(adate,"%m/%d/%Y") [1] "1959-07-30" > But when it
2008 Oct 05
2
Time Interval calculation using R
Hi I have two columns of data with time in form of HH:MM:SS - representing start time and end time of an activity. I am trying to calculate the time difference (duration of the activity). (1) I first tried > difftime(btime, etime, units = "mins") This however gave me the error - Error in as.POSIXlt.character(as.character(x)) : character string is not in a standard unambiguous
2014 Sep 11
2
Weird output of system load
All, One server of mine running CentOS 6.3. The load is very high, but few process in running or blocked. Followed is the output of /proc/stat, /proc/loadavg and top /proc/stat cpu 5351723 61716 6974590 161365578 240734 141769 380525 0 0 cpu0 4016881 9686 2510787 79408769 110721 141549 351075 0 0 cpu1 1334842 52029 4463802 81956808 130013 220 29449 0 0 intr 1081538370 139 8 0 0 0 0 0 0 0 0 0 0
2005 Sep 06
1
US Date Handling in Rails
My application is built on Rails and MySQL. It will only be accepting US formatted dates as input, however both Rails and MySQL are oriented around ISO the format. I know I can convert a good portion of the entries using ParseDate::parsedate but it does not appear this is how the conversion is taking place when data is being transferred from the params hash into model members. Say I have a field
2006 May 21
3
Using ParseDate in for loop
Hi, I''m trying to use ParseDate within a for loop but I get this error: can''t dup NilClass Any suggestions for making this work? Thanks, -Jason
2006 Oct 27
1
Censored Brier Score and Royston/Sauerbrei's D
System: R 2.3.1 on a Windows XP computer. I am validating several cancer prognostic models that have been published with a large independent dataset. Some of the models report a probability of survival at a specified timepoint, usually at 5 and 10 years. Others report only the linear predictor of the Cox model. I have used Harrell's c index for censored data (rcorr.cens) as a measure of
2006 Jan 16
3
String date parsing
Does anyone know if a Ruby package has been written to handle functionality similar to php''s strtotime(). I''m looking for something that can parse almost any string (such as "1 day ago", "+1 week", "last tuesday") into a timestamp. I''ve played with ParseDate, but it doesn''t seem to do what I need. Any suggestions? Derek
2006 Jan 26
0
Troubleshooting a camping trip?
I''m anxious to get camping[1], but when I try to run the sample app[2] with: camping home_page.rb I get the source HTML in the terminal along with this errror: ##BEGIN ERROR /usr/local/lib/ruby/gems/1.8/gems/camping-1.2.46/bin/camping:26:in `const_get'': nil is not a symbol (TypeError) from /usr/local/lib/ruby/gems/1.8/gems/camping-1.2.46/bin/camping:26 from
2006 Jan 28
0
Testing trouble?
Could someone please help me figure out this, my first test ever? When I try to run a test based on the one in Agile, p. 145, I get this error: #BEGIN ERROR Loaded suite test/unit/member_test Started F Finished in 0.469879 seconds. 1) Failure: test_create(MemberTest) [test/unit/member_test.rb:8]: <nil> expected to be kind_of? <Member> but was <NilClass>. 1 tests, 1
2007 Feb 16
1
array searches
Folks, I have a dataframe comprising a column of dates and a column of signals (-1, 0, 1) that looks something like this: 30/01/2007 0 31/01/2007 -1 01/02/2007 -1 02/02/2007 -1 03/02/2007 1 04/02/2007 1 05/02/2007 1 06/02/2007 1 07/02/2007 1 08/02/2007 1 09/02/2007 0 10/02/2007 0 11/02/2007 0 12/02/2007 1 13/02/2007 1 14/02/2007 1 15/02/2007 0 16/02/2007 0 What I need to do is for each signal
2006 Jul 26
8
change text_field_tag class
in my booking / _form I have the following input fields : (startdate and endate) <div> <label for="startdate">Booking Start Date</label><br /> <%= text_field_tag(''startdate'', @startdate, {:class => @startdateclass, :readonly => "readonly", :maxlength => "25"} ) %> <%= observe_field("startdate",
2019 Oct 16
2
BackupPC v4 from epel
Hello Everyone, Has anyone tried to install BackupPC v4 on CentOS 8 from epel? I just did and this happened: [root at resurrect ~]# dnf --enablerepo epel install BackupPC Last metadata expiration check: 0:18:41 ago on Tue 15 Oct 2019 08:03:59 PM EDT. Error: Problem: conflicting requests - nothing provides par2cmdline needed by BackupPC-4.3.1-2.el8.x86_64 - nothing provides
2019 Jun 14
1
Update 4.10.2 to 4.10.4: Cant create files in subdirectorie anymore
Hi everyone, since i upgraded from 4.10.2 to 4.10.4 i can't write into subdirectories of a share anymore. This worked perfectly fine before i upgraded and also works again if i downgrade.? I think either something is fishy with the 'filename_convert_internal' function of ".../source3/smbd/filename.c" or my configuration needs to be adjusted for 4.10.4. I tried several
2006 Jun 05
3
How to get dd mmm and yyyy from dd-mmm-yyyy
The input values could be something like this: 01-Dec-2006 01-December-2006 1-June-2006 Is there an easy to way to get the three variables populated dd, mmm and yyyy for any of the above input values? I tried to look at regex but couldn'' anything simple. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Dec 08
0
Holiday Gift Perl Script for US Holiday Dummy Regressors
##### BEGIN CODE ###### #!/usr/bin/perl ###### # # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or Weekly respectively (e.g. Does this week have a particular holiday) # --file, -f = Ummm where to write the output silly! # # **NOTE** The EOM holiday is "End of Month" for
2006 Jun 15
4
parse only seem to understand US date format
I''ve tried Time.parse() and DateTime.parse() but they interpret the date as US format. Is there any way to tell it to interpret as dd/mm/yyyy? -- Posted via http://www.ruby-forum.com/.
2009 Dec 08
0
Opps Correct Version of Holiday Regressor Perl Script
Here is the correct version. The old version is the redirect only version of the script. ### BEGIN SCRIPT #### #!/usr/bin/perl ###### # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or Weekly respectively (e.g. Does this week have a particular holiday) # --file, -f = Ummm where to write
2006 Jul 17
2
european date format
hi, overhere users go nuts if they have to enter the date in iso format, so i have to make my applications in such a way that not only dates are displayed in the "dd-mm-yyy" format but also can be entered in that way. somewhere i found this code to put in the environment script: ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update( :default => ''%d/%m/%Y