web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Tajwal's Blog / Convert Time to integer in ...

Convert Time to integer in MS SQL server 2008

Community Member Profile Picture Community Member

Since Dynamics AX 2009 TimeIn and TimeOut EDTs store time in seconds (integer) in database.

If you want to import data from outside AX, and it’s in the format of time you need to convert hours and minutes to seconds first then can be store it in AX database.

Below code convert SQL Time to integer (seconds).

[TimeIn] =

(datepart(HOUR,PunchTime)*3600) + DATEPART(MINUTE,punchTime)*60) +(DATEPART(SECOND,PunchTime))


Filed under: Dynamics AX 2009

This was originally posted here.

Comments

*This post is locked for comments