Displaying 20 results from an estimated 10000 matches similar to: "Escape characters or replace function"
2006 Apr 20
7
checking date
Radrails created a field for date
<%= product.date_available.strftime("%y-%m-%d") %>
What does this mean?
Should the definition be date or datetime? I tried both and no results
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2006 Mar 02
2
TIMESTAMP, DATETIME not working
I am using the latest SVN version 1.2 of Asterisk
When I attempt to test the output of certain variables, for use in file
naming etc, certain key ones appear to fail.
exten => 5555,1,NoOp(${EPOCH})
Returns
-- Executing NoOp("SIP/200-638c", "1141352935") in new stack
exten => 5556,1,NoOp(${TIMESTAMP})
Returns
-- Executing NoOp("SIP/200-8cc9",
2009 Sep 27
1
digium fax: failed to queue document
In my quest to actually send a fax, I'm now stuck trying to send the
confirm.
First I send the fax:
-- Executing [send at outbound-fax:2] System("Console/dsp", "env echo
-e "Channel:DAHDI/g0/12036378447\\nContext:fax-tx\\nExtension:
s\\nPriority: 1\\n" >/var/spool/asterisk/outgoing/call-1254012878.0") in
new stack
-- Auto fallthrough, channel
2006 Dec 15
1
What's up with DATETIME and TIMESTAMP in Asterisk 1.4beta3 ?
Hello,
In Asterisk 1.4 beta 3, the UPGRADE.txt file says:
Variables:
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
${CALLERANI}, ${DNID}, ${RDNIS}, ${DATETIME}, ${TIMESTAMP},
${ACCOUNTCODE},
and ${LANGUAGE} have all been deprecated in favor of their related
dialplan
functions. You are encouraged to move towards the associated dialplan
function, as these
2006 Jan 23
3
date.to_s trimming
When I convert a datetime to a string, it prints out something like this
Jan 20 12:00:00 EST 2006
I want to trim off the last twelve characters, i.e.
:00 EST 2006
I tried to do it like so:
@date =
@meeting.date.to_s.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp
but the chomps seem to do nothing. I''d love to use regex, but I don''t
know which
2009 Jan 09
2
Confused about to_xml() in ActiveRecord::Base subclass
Since all my efforts to control how to_xml() is formatting dates has
failed, I''m now considering writing my own to_xml(). However, from
the limited examples I''ve found, I just don''t understand how to
actually reference the columns for the records in my record set.
Here''s a simplified view of my ActiveRecord object:
class Errors < ActiveRecord::Base
2006 Nov 22
4
Error when starting bgrdb
Hi,
I get this error when starting bgdrb using "rake
backgroundrb:start" (on a Mac using bgdrb 0.2.0):
/Users/gl/Projects/xxxxx/xxxxx/vendor/plugins/backgroundrb/server/lib/
backgroundrb_server.rb:33:in `format_message'': undefined method
`strftime'' for "2006-11-22T12:34:18.524572 ":String (NoMethodError)
from /usr/lib/ruby/1.8/logger.rb:320:in
2005 Nov 20
1
mySQL 5.0 upgrade - incompatible DateTime format?
I''ve upgraded to mySQL 5.0, and it''s gone pretty smoothly except that on
DateTime.now doesn''t seem to return a value that mySQL likes any more,
as seen in the following exception:
Incorrect datetime value: ''2005-11-20T15:33:12-0800'' for column ''logged_at'' at row 1: UPDATE notes SET `due_on` = ''2005-11-20'',
2005 Jan 19
1
Re: [R-SIG-Mac] Formatting of time zone for POSIXct
Don,
thanks for your report.
On Jan 19, 2005, at 12:41 PM, Don MacQueen wrote:
> I'm encountering a problem formatting POSIXct objects in R 2.0.1 on OS
> X.
>
> For reference, on a Solaris system, R 2.0.1 (2004-11-15), formatting
> is correct:
>
>> Sys.time()
> [1] "2005-01-19 09:12:33 PST"
>> format(Sys.time(),'%H:%M %Z')
> [1]
2006 Oct 19
3
Selecting datetime values from SQL Server (year < 1970)
All,
Rails 1.1.6.
Any AR find() call that generates a SELECT * type query against a table
with a DATETIME column in SQL Server whose value occurs before 1970 will
fail, because of the coercion of SQL Server datetime types to Time
values in Ruby.
See sqlserver_adapter.rb line 490
(record[col] = record[col].to_time if record[col].is_a? DBI::Timestamp)
If I remove the coercion (just commenting
2006 Jun 06
3
help with date formats
i have a datetime field in my database that i need broken up. i want to
display the date and the time in separate places. i tried looking
through the api, but couldn''t find what i was looking for.
if someone could please point me in the right direction to format dates,
that would be great. thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jan 20
47
SQL Server datetime error
i have a problem with the datetime format of rails. i am unable to save
a dataset to the db. here''s the error message -- the original error
message was in german, so i translated it -- i get:
DBI::DatabaseError: Execute
OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
Couldn''t convert a char-Datatype to datetime
HRESULT error code:0x80020009
2011 Nov 09
1
ConfBridge 1.6.20 user count
Hi all,
I'm using ConfBridge within Asterisk 1.6.20 and want to record the
conference, so I'd like to start the recording when the second user joins,
so in the example below, for example, how can I get the current user count
in ConfBridge 3000?
[conferences]
;authenticated conference (ext C-O-N-F = 2663)
exten => 2663,1,Answer
same => n,Wait(1)
same => n,Authenticate(143382)
2009 Sep 20
2
Date/Time to date & time
Hi,
Can strptime (or some other function) help me turn the following
column of a data.frame into two new columns, one as date and the other
as time, preserving the AM/PM value?
Thanks,
Mark
> B
ENTRY DATE
1 3/23/2009 6:30:00 AM
2 3/23/2009 6:30:00 AM
3 3/23/2009 6:39:00 AM
4 3/23/2009 6:39:00 AM
5 3/23/2009 6:48:00 AM
6 3/23/2009 6:48:00 AM
7 3/23/2009 7:00:00 AM
2012 Apr 17
6
ActiveRecord with different Date/Time format
I have an application where user sets his/her preferred date/time
format. User is expected to enter datetime in his preferred format
across the application. Now the problem is for few formats the datetime
is parsed wrongly while create/update ActiveRecord.
For example user has set date/time format in hh:mm dd/MM/yyyy. Now if
user enters 17:00 04/05/2012 it parses it as 5 PM 5 Apr, 2012 where it
2011 May 10
1
Converting ordinal dates and time into sensible formats
Hello all,
I am having a little trouble working with "strptime" and I was hoping
someone might be able to give me a hand. I have an instrument that outputs
an ordinal date and time in two columns something like this:
day.hour min.sec
1 12525 2050
2 12518 2029
3 12524 2023
4 12524 2028
5 12507 2035
Now the problem I am having is converting these numbers
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
2006 Jan 07
1
How to DRY with Fixtures (helper or extend Time class, how)?
I have a test/fixtures/users.yml like so:
apa:
id: 1
username: apa
[...]
created_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
updated_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
I don''t like how I''m repeating myself with the strftime bit.
Is there some shorter Time method to format time for a (MySQL) datetime
field that
2006 Jul 19
4
sorting and pagination
Hello All,
Okay i think I''m finally getting all of what i want out of ferret
working, thanks mostly to reading this forum and also getting ALOT of
questions answered, thanks alot everyone. Anyway my last ferret task is
too get the results sorted by a field called date_registered and have
this working with pagination.
here is what i''m doing at the moment:
2006 Jun 08
5
AM/PM select
I have a customer that has a request that the select_datetime fields
have AM/PM selectors instead of 24 hour time.
The rails time and datetime selects seem to only support 24 hour time.
I can''t seem to find any information on this. i was wondering if
there is already a solution out there, or will i have to roll my own?
Sean Wolfe
master nerd of
i heart squares, inc.
3711 N.