Displaying 20 results from an estimated 10000 matches similar to: "help with date formats"
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
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
2008 May 12
1
Escape characters or replace function
Hello,
I need to use the ${DATETIME} macro inside the filename saved by Record,
but the colons (':') used in the time interfere with the command
(everything after the colon is interpreted as the format I wish to save to):
My command is:
Record(/path/to/voicemail/${EXTEN}-${DATETIME}-${UNIQUEID}:wav)
I need some function to escape the colons inside DATETIME... I'm sure
it's
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
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]
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 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 Jun 07
7
file_column image versions
does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i''m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.
--
2006 Aug 04
3
forms and relationships
i''m still pretty new to rails, and while i''ve been able to hack my way
into having it do what i want so far, i''m not happy with the way my code
looks. on top of that, i''m sure that what i''m doing prlly isn''t the most
efficient either.
one of my biggest problems is probably to do with using relationships
and forms together. i''ve
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",
2006 Jul 05
5
ok, lightTPD is installed... how do i use it.
i used the hivelogic article to install ruby on rails to my mac:
http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
everything works great using the script/server command, but isn''t that
still using WEBrick? how do i server my apps with lightTPD?
i tried following the instructions given here:
http://duncandavidson.com/essay/2005/12/railsonlighty
but have had no
2006 Jun 20
5
ActionMailer to send to multiple people
I''ve been working with ActionMailer for a few days and finally have a
pretty good grasp of it. In the book I''m reading, it shows how to send
to multiple users or an array of users.
Is there a setting or some configuration I can do to send the email to
each person separately, or would I just need to loop through each user
and send one email at a time?
What is the best way to
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
2006 Jul 15
4
learning from typo.
i have a copy of the typo source on my desktop that i am going through
just to get a better understanding of the rails framework and ruby
itself. i''m fairly new to everything so it has proved to be very helpful
and very inspiring.
i''m stuck on a part though. i was trying to figure out how everything on
the sidebar works. i found the components folder and started looking
2006 Apr 28
5
please explain web services
could someone explain some of the uses for a web service. i''m reading
about how to make them, but i''m still not quite sure what they''re good
for.
i have multiple rails apps that i would like to pass user information
back and forth to. i''m not sure if something like this could help me or
not.
thanks
--
Posted via http://www.ruby-forum.com/.
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 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
2006 Jun 19
4
DateTimes get converted to Dates in XML-RPC????
Hi all -
I have written an XML-RPC app using action-web-service. Mostly works
well. Except I just noticed that my :datetime types are coming back as
:date types.
That is, when in the console I query the record via Foo.find_by_id(123) I
get back actual datetimes. If I then do it via XML-RPC, fetching that
same record I get back dates (ie. hour/minute/second are set to 00:00:00)
Any ideas?
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)