Displaying 20 results from an estimated 3000 matches similar to: "STRFTIME() why is it not defined"
2006 Apr 04
11
Date/Time format and syntax
Hi,
Just wondering how I get both the current date and time to display here
(so far I can only get the date OR the time):
@tblregisteredphone.txtregisterdatetime = Date.today
Also, how can I change the format of the date and time from:
Tue Apr 04 00:00:00 GMT Daylight Time 2006
to
2006-04-04 12:04:00
??
I''m sure it''s very simple, I just don''t know how
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi,
I would like to make @dates in my controller.
I tried the following:
startdate = Time.now
enddate = startdate.next_week
for enddate > startdate
@dates << startdate
startdate = startdate.tomorrow
end
But I get an errormessage when I check the syntax:
"warning: useless use of a variable in void context"
Anyone?
Thanks!
Steven.
--
Posted via
2011 Feb 04
5
Date parse - month and day reversed
I am getting the month and day reversed in parsing a date. I am wondering if
there is some intelligence in Ruby that knows that at the moment I am in
Mexico, as the parsing is working as if I was
"6/15/2008".to_date
=> ArgumentError: invalid date
"15/6/2008".to_date
=> Sun, 15 Jun 2008
What I really want is my date to be understood as month/day/year. Is there a
way to
2006 Jun 14
5
display formatted date
Hi,
In my form I have date field set as ''datetime_select'' which is fine as I
wanted it in the same format. But while displaying (list action) it
displays date in long format i.e. ''Tue May 30 15:39:00 Central Daylight
Time 2006''. How can I format it so that it will just be diaplyed as
''dd/mm/yyyy'' format?
Thanks
--
Posted via
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi,
I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string???
I get a date format error.
Thanks in advance
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Jan 16
8
[newbie] This Month / Next Month / The One After That
What I want to do is simple.
I''d like code that prints out the name of this month (January) the next
month (February) and the one after that (March)
I''ve been able to print this month:
<% t = Time.now %>
<%= t.strftime(" This Month is: %B") %>
But I can''t figure out how to get the next months to print out!
--
Posted via
2008 Apr 22
2
How to convert time from rss feed to another format ?
Hi,
I need to parse the rss feed and use the pubDate field to generate a
field in a xml file to use as an input to simile timeline. RSS returns
the pubDate as :
Sun Feb 24 06:33:32 UTC 2008
But I need it as a string :
"Feb 24 2008 06:33:32 PST"
When I do :
...
@dt=feed_item.time
@dt=@dt.to_date
word_date=''%b %d %Y %H:%M:%S %z''
puts @dt.strftime(word_date)
...
2008 Jun 28
14
Date Field convert to Seconds since Epoch
Hi, I was wandering if anyone could help me with this problem:
Right now I am using a field in my database which is of type
''Date'' (in the form dd-mm-yyyy). I would like to convert this value
(for example 26-06-08) into a number of seconds since epoch or into
another form so I can compare it with todays date (from Date.now) so
that I can tell the difference between the two dates
2008 Dec 09
3
Voicemail.conf: where to fin strftime manual entry ?
Hi,
In voicemail.conf, you can read
; Look in /usr/share/zoneinfo/ for names of timezones.
; Look at the manual page for strftime for a quick tutorial on how the
; variable substitution is done on the values below.
Where can this manual page for strftime be found ?
man strftime and apt-cache search strftime don't reply much ...
Regards
-------------- next part --------------
An HTML
2010 Jul 13
3
STRFTIME function declared in globals context
I'm trying to declare a few date-related global variables to ease my
dialplan. When I declare the following in the [globals] context of
extensions.conf, I get unexpected results:
YEAR = ${STRFTIME(${EPOCH},,%Y)}
MONTH = ${STRFTIME(${EPOCH},,%m)}
DAY = ${STRFTIME(${EPOCH},,%d)}
TIMESTAMP = ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}
If I evaluate these variables in the dialplan later, using
exten
2013 May 16
1
strftime
Hello,
I'm a little surprised about the result of strftime for my data.
> str(time)
chr [1:315504] "2006-01-01 00:10:00" "2006-01-01 00:20:00" "2006-01-01
00:30:00" ...
> str(strftime(time,format="%Y-%m-%d %H:%M:%S"))
chr [1:315504] "2006-01-01 00:00:00" "2006-01-01 00:00:00" "2006-01-01
00:00:00" ...
Why
2006 Feb 28
6
Activerecord equivalent of the SQL "SUM()" function.
Search doesn''t seem to be working, so forgive me if I''m covering old
ground here, but I''m having a difficult time figuring out how to
implement a "SUM()" function using Active record. Obviously, I could
just create a query, but I''d rather make it part of my active record
object.
Basically I have an object called "Report <
2012 Feb 03
3
strftime - Dates from Excel files
Hi
I have many excel files were the Date field was not declared as date,
so the dates look like this: 1/2/1978
I know that the format is day/month/year
How can I make R change this to Date format?
If I use strftime, I get wrong dates:
dataset=c("1/2/1978")
strftime(dataset,"%d/%m/%Y")
"19/02/0001"
Thanks in advance.
2010 Oct 29
2
strftime vs strptime ??
Hello
Could anyone explain me the difference between strftime vs strptime, please
?
I've read the help but it's a little bit cionfusing for me.
cheers
--
View this message in context: http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.html
Sent from the R help mailing list archive at Nabble.com.
2008 Feb 04
1
strftime fails on POSIXct objects (PR#10695)
R 2.6.1 on a Thinkpad T60 running up-to-date Gentoo:
Despite the documentation, which says:
'strftime' is an alias for 'format.POSIXlt', and 'format.POSIXct'
first converts to class '"POSIXlt"' by calling 'as.POSIXlt'. Note
that only that conversion depends on the time zone.
strftime fails on POSIXct objects:
> foo <-
2008 Jan 24
2
Meridian case
Hi there,
I have a *really* weird issue with rspec on rails:
Given a time meridian formatted using %p
When I run `rake spec` the time meridian is converted to lower case:
expected: "Today 08:00 PM",
got: "Today 08:00 pm"
Yet when I run `rake spec:models` and `spec -cfs app/models` the specs
pass, ie the the time meridian is in upper case.
Anyone got any ideas how I
2006 May 13
1
undefined method `strftime'', being called from a partial.
Hi,
I''m having an issue with calling a function that I''ve defined in
ApplicationHelper called format_time:
module ApplicationHelper
def format_time(time)
time.strftime("%a %b %d, %I:%M%p")
end
end
I use this function in my views to format the Time.now that I would have
stored in my tables as a DATETIME. I''m able to use this function, without
any
2008 Jul 29
1
can't crop images using ImageMagick
I''m using Attachment_Fu to save several thumbnails of a photo
(resizing with ImageMagick)
But when I try to crop them, nothing seems to happen to the file I
want to drop and no error messages. I check the file timestamp of the
thumbnail I want to crop and it looks updated. What''s strange is that
ALL the other thumbnails and the original image''s file timestamps are
2012 Jun 26
4
ActionView::Template::Error (undefined method `strftime' for nil:NilClass)
Hello, I''m a newbie. I need help resolving this issue. I recently added a
pdf to the newsletter admin section of the website and now I can no longer
view page 2 of the list of pdf''s. Nor can I login to see the newsletters as
a student. I''m using Ruby 1.9.3, Rails 3.2.1.
Here''s the information from the log file.
ActionView::Template::Error (undefined
2006 May 16
4
question about strftime when called from partial.
Hi,
I''m calling a helper I''ve written - format_time() that is called from my
views with a given time that was selected from my database and was returned
to the view via an instance variable. When I call format_time from a
partial, I see that I get some kind of String error and the partial won''t
render. Basically, the object being passed in to format_time is already a