473,624 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting Time To Timestamp

1 New Member
Hey,

I have lots of times in the following format: g.i, so 12.30, 1.05, 2.25, 4.50 etc.

However I would like to convert the time into a timestamp, so I can sort them by earliest to latest, as at the moment I don't think I can do that?

Help appreciated!

Thanks
Jan 18 '08 #1
1 1355
code green
1,726 Recognized Expert Top Contributor
What about casting them to a string then using strtotime()
Jan 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4709
by: zaceti | last post by:
I'm new to MySQL and I am having a problem selecting the highest valued date/time for a particular day. Here is the table structure: +--------------+-----------------+-----+----+--------+--------------+ | Field | Type | Null| Key| Default|Extra | +--------------+-----------------+-----+----+--------+--------------+ | id | int(10) unsigned| | PRI| NULL |auto_increment| | timestamp | datetime ...
3
2096
by: Yariv via SQLMonster.com | last post by:
Hi, When I open a tabe in the SQL enterprise manager I see the Timestamp Field in this Format : 24/01/2005 16:45:00 However when I'm using the Query analyzer or other SQL Client I see the Timestamp Field in this Format : 2005-01-24 16:44:59.997 Does Anybody know what to do in order to display the Timestamp Field in
2
16211
by: Alex | last post by:
Hi all, Got a small problem here. I have a number of web caches here that generate loads and loads of log files and instead of keeping them for analysis I want to write them to a db/2 database. The problem I've got is that the log files have a timestamp field that
2
7048
by: TofuTheGreat | last post by:
I'm using "Now.ToOADate" for a record timestamp in a small database app (it's what I want to do so don't try to disuade me ;-D). Anyway. I store the value of Now.ToOADate in a string field in the database (16 character field on a SQL server to be exact). Is there a way of converting the text value from that field back into a readable date/time? For example if a date is stored in the 16 character field as the OLE Automation format...
2
5856
by: shenanwei | last post by:
DB2 V8.2 on AIX, type II index is created. I see this from deadlock event monitor. 5) Deadlocked Connection ... Participant no.: 2 Lock wait start time: 09/18/2006 23:04:09.911774 ...... Deadlocked Statement: Type : Dynamic Operation: Execute
5
1530
by: sparks | last post by:
We are slowly converting all of our older access 97 databases to 2003. One of them that has been running fine for 3 + years and has over 2000 records in is giving me a problem. It converted fine and seems to be ok until LOL I add a new person and enter data....when I try to close the form it says this record has been modified by another user and can not be saved...then the save==copy to clipboard===drop changes box comes up. anyone...
6
34079
by: marc | last post by:
hi im trying to convert Date() into a unix timestamp so i can stick the result into a mysql db, please help!
1
4073
by: Matt | last post by:
Hi all, So a lot of digging on doing this and still not a fabulous solution: import time # this takes the last_modified_date naive datetime, converts it to a # UTC timetuple, converts that to a timestamp (seconds since the # epoch), subtracts the timezone offset (in seconds), and then converts
5
32988
by: Hemant Shah | last post by:
Folks, How can I convert date/time/timestamp to an integer? According to UDB 8.1 docs that I have, INTEGER('1964-07-20') should return 19640720, but when I run the SQL statement I get different answer: # db2 "VALUES INTEGER(CHAR(1964-07-20))"
6
6573
by: alexs | last post by:
hi, I'm moving a mysql database over to using db2 V9.5 The database is used by our radius server to store network accounting information from our switches. One parameter is the length of a network session in seconds. In mysql there is a sec_to_time function which i then used to store the session time as a char string
0
8242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8681
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8629
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4183
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.